tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bragg, Casey" <Casey.Br...@allegiancetelecom.com>
Subject Session invalidation/ creation
Date Tue, 21 Mar 2000 16:00:42 GMT
I've got a jsp page with a logout button.  Pressing the button results in
the following code fragments being run.  Though the strategy worked with
JServ, its not working with Tomcat 3.0.  Any ideas why?

HttpSession session = request.getSession(false); 
   // Consider that the current session has already 
   // been established by an earlier request.getSession(true)

session.invalidate();

session = request.getSession(true);
   // For some reason (in Tomcat 3.0) session now points 
   // to the same session which is already invalidated.  
   // In other words, this doesn't return a new session.
   // Subsequent attempts to use session result in 
   // exceptions such as...
   // javax.servlet.ServletException: getAttribute: Session already
invalidated

Thanks...

...Casey



Mime
View raw message