tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Parsons Technical Services" <>
Subject Re: Detecting and handling session timout
Date Wed, 28 Apr 2004 17:15:55 GMT

I am shooting from the hip on this one, but what if you caught the NPE
exception in the jsp and redirected them to a login page?

I know on a lot of sites I have used use this as the basic action. Some say
why your redirected, some don't. You could pass a parameter to the login
page that would add the notification of session timeout.


----- Original Message ----- 
From: "Bill Bruns" <>
To: "Tomcat User" <>
Sent: Wednesday, April 28, 2004 1:06 PM
Subject: Detecting and handling session timout

> Hello Tomcats:)
> Our technical challenge is that when a session is left inactive in a
> 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
> 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
> or some such message.
> In other words we want to do an asynchronous action from within the
> pushed out to the client.
> However in testing so far we can only detect the creation of the session
> not its death.
> In other words, the sessionCreated() part of the interface is being
> 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.
> Suggestions?
> Bill Bruns
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

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

View raw message