You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2003/03/28 10:14:01 UTC

DO NOT REPLY [Bug 18456] New: - isRequestedSessionIdValid returns false after getSession(true)

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

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18456

isRequestedSessionIdValid returns false after getSession(true)

           Summary: isRequestedSessionIdValid returns false after
                    getSession(true)
           Product: Tomcat 4
           Version: 4.1.18
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Catalina
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: tomasz@rtsoftware.com


In a Tomcat 4.1.18 embedded within JBoss I have an application that uses 
Filters. At one point one of the filters decides if the current session should 
be recreated (for example after having checked that the session is not valid) 
and does it so using request.getSession(true).

The problem is, that even then request.isRequestedSessionIdValid remains false. 
As a result methods further on in the execution pipeline, that do not have the 
knowledge of the fact that the session has been recreated do have troubles with 
it. 

To summarize:
after request.getSession(true);

read the session with
request.getSession(false);

then (session != null) since it is now new and valid
but request.isRequestedSessionIsValid() == false

it's IMO not logical

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org