tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shapira, Yoav" <>
Subject RE: Question about creating new HttpSessions
Date Thu, 16 Sep 2004 19:19:57 GMT

Why don't you want to invalidate the old one?

Yoav Shapira
Millennium Research Informatics

>-----Original Message-----
>From: []
>Sent: Thursday, September 16, 2004 3:13 PM
>Subject: Question about creating new HttpSessions
>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

This e-mail, including any attachments, is a confidential business communication, and may
contain information that is confidential, proprietary and/or privileged.  This e-mail is intended
only for the individual(s) to whom it is addressed, and may not be saved, copied, printed,
disclosed or used by anyone else.  If you are not the(an) intended recipient, please immediately
delete this e-mail from your computer system and notify the sender.  Thank you.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message