tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cliff Willsher <>
Subject Re: Session "Goes Away" (?)
Date Sun, 30 Nov 2003 07:57:45 GMT

I had the similar problem (Tomcat 5) but found that my firewall (Zone Alarm 
Pro) was blocking session cookies. If the cookie can't be set then you get 
a new session each time.

Incidentally, Zone Alarm Pro seems to have a bug whereby it blocks session 
cookies from localhost even if they are enabled for all else.


At 18:06 29/11/2003 -0600, you wrote:
>I'm running Tomcat 4.1.27 standalone on Windows XP Pro using IE.
>I've been developing my first web application in JSP with some 
>success--then I decided to converted it into servlets. [sigh...]
>I tried following the examples in Dustin Callaway's INSIDE SERVLETS, 
>Second Edition.  The structure he proposes for the servlet is simple 
>enough (detail omitted):
>1. session = request.getSession(true);
>2. if (session.isNew()), then output an HTML page.  In this case, the page 
>contains a form with my servlet as the ACTION destination.
>3. Else (i.e., if not isNew()), process whatever the form returned.
>My problem is that if I print session, then I find that everytime I enter 
>the servlet, I have a different session.  If I print the result of 
>getRequestedSessionId(), it's differnt too. Also, I've tried doing a 
>session.setAttribute(), but it's always null on the return to the servlet. 
>This all implies that I'm constantly getting a different session object.
>getMaxInactiveInterval() = 1800, so the session isn't being artificially 
>invalidated by a ultra-short timeout.
>Any suggestions?
>Merrill Cornish
>To unsubscribe, e-mail:
>For additional commands, e-mail:

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

View raw message