tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Bruns" <>
Subject Detecting and handling session timout
Date Wed, 28 Apr 2004 17:06:39 GMT
Hello Tomcats:)

Our technical challenge is that when a session is left inactive in a browser
for a long time (about 30 minutes)
then the next click results in a jsp page crash.
The crash is a null pointer exception, apparently because an object in a
javabean has become null.
Our theory is that the Tomcat session is timing out and that this causes the
beans to vaporize.
Is there a way to avoid this?
Presently we are experimenting with the HttpSessionListener interface, in
hopes that we can detect the session
timing out and throw up a notice on the screen saying "please log in again"
or some such message.
In other words we want to do an asynchronous action from within the server,
pushed out to the client.
However in testing so far we can only detect the creation of the session but
not its death.
In other words, the sessionCreated() part of the interface is being executed
by the system, but not
the sessionDestroyed().

I am running Tomcat 4.1.24 on Solaris 8, connected to Apache httpd 2.0.49
via the JK connector.


Bill Bruns

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

View raw message