tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phillip Morelock <subscripti...@phillipmorelock.com>
Subject Re: Cannot retrieve session after visiting a different servlet contex t
Date Tue, 28 May 2002 23:32:59 GMT
This is happening because browsers associate cookies with the name of the
server, whereas Session ID's among tomcat contexts do not cross over.

Since the cookie / identifier for the session is something like JSESSIONID
and is associated in the client browser with your server, this property gets
overwritten when you visit the other context, because TC will not recognize
your JSESSIONID as belonging to this context.  It will assume you have an
expired session and generate a new one.  When you go back to the other
context, then of course this happens again, because THAT context won't be
expecting your new JSESSIONID.

fillup


On 5/28/02 4:20 PM, "Ghanshyam Patel" <Ghanshyam.Patel@VITALPS.COM> wrote:

> 
> I am using Tomcat 4.0.3 and have 2 servlet contexts running in the same JVM.
> 
> Session SA is created when I visit a page served by servlet context A.
> Session SB is created when I visit a page served by servlet context B. Now,
> when I revisit a page served by context A, a new session is created! I would
> expect to find session SA instead of a new session. Is this normal? Why is
> this happening?
> 
> Thanks
> Ghanshyam
> 
> --
> To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>
> 


--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message