Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
The moose likes JSF and the fly likes Timeout listener Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Timeout listener" Watch "Timeout listener" New topic

Timeout listener

Robert James Liguori
Ranch Hand

Joined: Nov 27, 2007
Posts: 541

I'm using a listener to determine when a session has expired (i.e. sessionDestroyed method of HttpSessionListner).

What is the best way to redirect to a (session expired message) web page when a session has expired?

I'm trying to call a servlet but apparently doesn't work due to some subtlety in the session expiration.

Also, I need the code only to work for timeout's... not when destroy the session by logging out.


My Blog (I frequently post on Java, JSF and NetBeans)
Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
Use the meta refresh header in combination with ${pageContext.session.maxInactiveInterval}.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: Timeout listener
jQuery in Action, 3rd edition