tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Funk <funk...@joedog.org>
Subject Re: Tomcat losing session
Date Tue, 14 Jan 2003 23:31:48 GMT
Could the problem be this?
http://marc.theaimsgroup.com/?l=tomcat-dev&m=104246720928753&w=2


Charlie Toohey wrote:
> Thanks. However, I am writing the cookie value to the log, and the cookie 
> value is identical for subsequent requests, yet Tomcat creates a new session 
> on each request. So it looks like it is parsing the headers correctly.
> 
> 
> 
>>I had a problem recently with a browser not setting Content-type correctly.
>> If the Content-type is note set correctly, Tomcat can't parse the HTTP
>>headers (including the cookie), so it'll create a new one.
>>
>>
>>Charlie Toohey wrote:
>>
>>>Infrequently, Tomcat is creating a new session on each request from the
>>>same cookie, when all of the requests should be in the same session.
>>>
>>>I am logging the cookie and session ids to debug this. What I see is that
>>>a request comes in with cookie JSESSIONID=X. Tomcat creates a new
>>>session, with session id=Y. Then, another request comes in from the same
>>>client, and cookie value JSESSIONID=X (still). Tomcat creates a new
>>>session again, with session id=Z.
>>>
>>>What happens most of the time is that client request comes in with cookie
>>>value JSESSIONID=X, and Tomcat creates a new session with session id = Y.
>>>When another request comes in from the same client, cookie value
>>>JSESSIONID now = Y, and Tomcat session id is Y. As expected.
>>>
>>>The same requests can produce the two different scenarios, so it does not
>>>appear to be specific to the resource which is requested.  But there are
>>>more specifics --- when this happens, the first resource requested in the
>>>session is a servlet, which does a sendRedirect, resulting in the
>>>request. I don't know if there is something about this sequence that
>>>could cause the problem.
>>>
>>>As I said, this happens very infrequently, and can not be reproduced at
>>>will. When it does happen, it happens on every request from the client
>>>--- every request receives the same cookie JSESSIONID value, but creates
>>>a new session. It's like once it gets into that mode, it can't get out.
>>>
>>>Has anyone else ever experience this behavior of losing sessions ?
>>>
>>>We are using Tomcat 4.1.12 with Apache 1.3.27 running on Mandrake Linux
>>>8.1.
>>>
>>>Thanks for any help,
>>>Charlie
>>>
>>>--
>>>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>
> 
> 


--
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