tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sonny Sukumar <>
Subject When is a session cookie set?
Date Thu, 15 Jan 2004 07:31:15 GMT

Is a session cookie supposed to be set for the very
first page one visits of a site, even if no session is
created in the logic to produce that page?  (i.e.
getSession() is never called)

Because, from my tests, that seems to be happening for
me.  And I don't want it to because I'm actually
passing a URL-encoded session ID (";jsessionid=..."),
but it gets ignored starting from the 2nd request
because apparently the session cookie is being set on
the 1st request.

If you're wondering what I'm trying to do
specifically, I'm trying to automatically route a
customer back into the checkout process after
successfully registering and clicking a link sent in a
verification email (to verify the email address). 
This link contains the URL-encoded URL and so IDs the
correct session for the first request, but the session
ID set in the cookie is totally different, so the
customer loses her session (and hence her shopping
cart, etc.) from then on! seems like it'd be ideal to somehow get Tomcat
to use the same session ID value I pass in the URL for
the cookie that it sets.  Is there any way to do this?

Btw, I'm using Tomcat 4.1.27.  Thank you all very much
for your help.


Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes

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

View raw message