tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phillip Qin <>
Subject RE: Tomcat 4 losing session (may be related to Win XP)
Date Thu, 06 Nov 2003 15:55:23 GMT
Have you tried to append jsessionid?

-----Original Message-----
From: Justin Ruthenbeck [] 
Sent: November 5, 2003 9:32 PM
To: Tomcat Users List
Subject: RE: Tomcat 4 losing session (may be related to Win XP)

At 04:14 PM 11/5/2003, you wrote:
>I've been pulling hair out for several days with what turns out to be the
>same problem, except it's occurring on a Windows 2000 Server running IIS 
>and Tomcat 4.1.24.  The logs show that the first request to a servlet done
>via POST gets a different session id than the follow-on request via GET to
>the same servlet, same URL.
>The same app works fine on another Win2K server running Apache.  The one
>that doesn't work is behind a proxy server doing proxypassdir's to map a 
>to an internal IP.  Could this be the problem, or is it an IIS thing?

If you really want to see what's happening, put your own proxy between 
the client and the first server on your backend (I use zproxy -- google 
for it) to look at the http messages going back and forth.  Check the 
response that you're getting from Tomcat and note the JSESSIONID provided 
after the first call.  See what JSESSIONID the client machine sends 
back.  You can put the same proxy (or any http-level sniffer) between any 
of the servers and see who's passing what.

If you've established that Tomcat is receiving two different sessionId 
values, then you can be sure there's a mixup somewhere else (and the more 
hands you've got in the cookie jar, the more chances someone else is 
screwing things up).

>Wendell Holmes


>-----Original Message-----
>From: Justin Ruthenbeck []
>Sent: Wednesday, November 05, 2003 4:25 PM
>To: Tomcat Users List
>Subject: Re: Tomcat 4 losing session (may be related to Win XP)
>Are the sessions the same between the two calls?  That is, when you call
>HttpSession#getId() for each of them do you get the same id back?
>At 02:27 PM 11/5/2003, you wrote:
> >Hi all,
> >
> >I've come across a situation I can't figure out and I'm wondering if it
> >has to do with the fact that this is the first time we've installed
> >Tomcat on Windows XP Prof.
> >
> >Symptom: Tomcat loses session.  If you set up a very simple two JSP
> >process where page 1 stuffs (setAttribute) something into the session,
> >and page 2 displays it, the value comes back as null
> >
> >Tests: if I copy the two JSPs to the examples directory included in the
> >Tomcat distribution, the pages perform properly.  If I create my own
> >context and execute the pages from there, the getAttribute returns null.
> >
> >I created the context by duplicating the context in the server.xml file
> >and pretty much just changing the codebase.
> >
> >Other environment info: running behind Apache2 (latest), on port 8082
> >(http) and 8009 (AJP13) because Oracle Servlet Engine shows up on port
> >8080 (side note: anyone have info on how to get the flying pig to go
> >away when you've uninstalled the Oracle HTTP server???); JDK 1.4.*, and
> >this is Tomcat 4 (latest).
> >
> >The exact same set up works fine on Windows 2003 and Windows 2000 Prof.
> >And this machine works fine as a client to the server running on any
> >other machine, so it's not a cookie issue I don't think.
> >
> >Am I missing something obvious?  Could it be permission-related?
> >Something in the way the session data is stored on disk?  Sure would
> >appreciate any advice.
> >
> >Andrew Longley
> >Senior Software Developer
> >MindFlow Technologies, Inc.
> >

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

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message