tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ana <anbar...@yahoo.es>
Subject Tomcat 4.0 Beta3 and Request Attributes Error
Date Wed, 02 May 2001 16:23:09 GMT
Hi,
We think we have discovered an error. We call the include method of the 
RequestDispatcher from a servlet. Then,  we  call the setAttribute method 
of the request object  of the included JSP. If we call the getAttribute 
method of the request object in the servlet (after the include call), then 
there is not attribute.

Example:

MyServlet.java:

...
public void service(ServletRequest request, ServletResponse response){
    ...
    getServletConfig().getServletContext().getRequestDispatcher("MyJSP.jsp").forward(request,

response);
    Object obj = request.getAttribute("MyAttribute");
    // obj is null !!!!!!!!!!!!!!!!!!!!!!!!!!!!
    ...
}

MyJSP.jsp:

    ...
    request.setAttribute("MyAttribute", obj);
    ...

Thank you.


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


Mime
View raw message