DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40911>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40911

           Summary: problem with request response scope
           Product: Tomcat 4
           Version: 4.0.4 Final
          Platform: Other
        OS/Version: AIX
            Status: NEW
          Severity: major
          Priority: P2
         Component: Servlet & JSP API
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: [EMAIL PROTECTED]


When accesing a request variable affect the value of the variable with the same
name in the session. It supposes that they should have different memory
locations, no?
minimal jsp example :
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">
</head>
<body bgcolor="#FFFFFF" leftmargin=0 topmargin=0  rightmargin=0>

<center>
<% session.putValue("prueba","hola"); %>
<br> prueba en sesion 1 = <%=session.getValue("prueba")%>
<br> prueba en request 1 = <%=request.getAttribute("prueba")%>
<% request.setAttribute("prueba","adios"); %>
<br> prueba en sesion 2 = <%=session.getValue("prueba")%>
<br> prueba en request 2 = <%=request.getAttribute("prueba")%>
<br> prueba en sesion 3 = <%=session.getValue("prueba")%>
<br> prueba en request 3 = <%=request.getAttribute("prueba")%>

</center>
</body>
</html>
RESULT:
----------------
prueba en sesion 1 = hola 
prueba en request 1 = hola 
prueba en sesion 2 = adios 
prueba en request 2 = adios 
prueba en sesion 3 = null 
prueba en request 3 = adios 

The same code in PC with websphere works fine.
It seams that the change of one affect the other value, what seams more strange
is that accessing the value of the request put the value of the session to null.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to