File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes redirecting a request with HttpSessionBindingListener Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "redirecting a request with HttpSessionBindingListener" Watch "redirecting a request with HttpSessionBindingListener" New topic

redirecting a request with HttpSessionBindingListener

Tony May

Joined: Jan 04, 2002
Posts: 17
Dear All,
Is it possible to recreate a new session object as soon as a timeout has occured on the original. I presume I would need to put an object in the orginal session that implements the HttpSessionBindingListener and recreate it in the valueUnbound(). Alterantively, is it possible to redirect a request object once the valueUnBound() has been called on an object
Any help would be appreciated
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13037
When your HttpSessionBindingListener gets called due to a timeout and the session being destroyed, there is in fact NO request on-going so you can't create a new session.
What you could do would be to move the data to some other form of storage such as a serialized file or database entry for that particular user.
Important Note: When the session is being destroyed, the only data you can reliably recover is that contained in the object that implements the HttpSessionBindingListener interface. Other items may have already been unbound.
I agree. Here's the link:
subject: redirecting a request with HttpSessionBindingListener
It's not a secret anymore!