tomcat-users mailing list archives

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

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.

Doug


----- Original Message ----- 
From: "Bill Bruns" <bbruns@fitme.com>
To: "Tomcat User" <tomcat-user@jakarta.apache.org>
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
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.
>
> Suggestions?
>
> Bill Bruns
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message