The first thing you should do is see what the session ID is--e.g., add,

        System.err.println("Session ID="+req.getRequestedSessionId());

If it keeps changing, you're losing the session ID somewhere: for instance,
you might have cookies turned off and you aren't calling
HttpServletResponse.encode[Redirect]URL() on all your URLs.

                                        -- Bill K. 

> -----Original Message-----
> From: Ralph Grove [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, July 10, 2001 9:07 AM
> To: [EMAIL PROTECTED]
> Subject: session problem - sessions disappear randomly
> 
> 
> I have an application running with tomcat 3.2.2 that is 
> dropping sessions at
> random, i.e., the HttpSession getSession() method 
> occassionally returns null
> for active sessions.
> 
> The application maintains user dialogs by binding certain application
> objects to sessions. It uses URL-rewriting to accomodate 
> browsers that don't
> allow cookies. Everything works fine when cookies are 
> allowed, but when
> cookies are not allowed by the browser, sessions are dropped 
> at random.
> 
> The session timeout is set to the default 30 min, though the 
> sessions are
> dropped in a matter of seconds. I've tried raising the 
> default heap size and
> have tried running the application on Windows and Unix 
> servers, but get the
> same results in any case.
> 
> Any suggestions or information would be appreciated.
> 
> Ralph Grove
> [EMAIL PROTECTED]
> 
> 
> 

Reply via email to