Thanks for the reply.

I can tell from this when the session expires but then I want to notify
the user that was using that session next time they make a request.
Rough sequence of events.

1. User browses to secure page.  Filter intercepts, sees the Session
does not contain the "login" object and redirects to login page.
2. User logs in, login object inserted into Session.
3. User works for a while in the web application.
4. User wanders off and has lunch.  Session expires after a while.
5. User returns from lunch, clicks something and is redirected to the
login page.

At this point I would also like to display at the top of the login page
"Your session expired due to inactivity, please log in again".

Hope that clarifies.

Cheers.

Mike.

-----Original Message-----
From: Mikolaj Rydzewski [mailto:[EMAIL PROTECTED] 
Sent: 20 March 2007 08:43
To: Tomcat Users List
Subject: Re: Session expiry

Mike Quilleash wrote:
> Does anyone know if there's a method for determining if the Session 
> for a user has expired since the last request?  Basically I have a 
> Filter that does an "is logged in" check and redirects to a login page

> if the user is not logged in.  This works fine but in the case of 
> Session expiry I would like to redirect the user to the login page 
> (works fine as the login object is stored in HttpSession) AND display 
> a message informing them that their session expired due to inactivity.

> Is there any way of telling the difference between the "not logged in 
> yet" and "was logged in but expired since last request" situations on
the server.
>   

HttpSessionListener: http://tinyurl.com/ypdslc


--
Mikolaj Rydzewski <[EMAIL PROTECTED]>


 This e-mail is bound by the terms and conditions described at 
http://www.subexazure.com/mail-disclaimer.html


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to