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" <[EMAIL PROTECTED]> 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:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
> 


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to