tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Question about creating new HttpSessions
Date Thu, 16 Sep 2004 19:12:36 GMT
First a little background.  I am working on a servlet that has a login
page that creates new HttpSessions.  If my users close their browser
windows between calls to the login page everything works wonderfully.
But if they browse to the page while they still have a cookie from an
old session, the method HttpServletRequest.getSession(true) returns the
old session.  I want to force the creation of a new HttpSession in this
case.  I do not want to invalidate the old session, I just want a new
My servlet is deployed to a Tomcat 4.1.x container, but if I have to
I can move to Tomcat 5.0.x.  In the ideal world, I would like to keep
my servlet container independent, but if I have to do something Tomcat
specific I will.
My question is: Is there any way to force the creation of a new
HttpSession, even if the HttpServletRequest has a cookie for an
old session?
Thank you in advance for your help
--matt hoover

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message