aspose file tools*
The moose likes Servlets and the fly likes Session Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Session" Watch "Session" New topic
Author

Session

Vallabhaneni Suresh Kumar
Ranch Hand

Joined: Mar 01, 2004
Posts: 68
In servlets I want to do something,when the session expires.How to achive this?

Thank you
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
Check this out.
http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/http/HttpSessionListener.html
Sol Mayer-Orn
Ranch Hand

Joined: Nov 13, 2002
Posts: 311
To add to the previous (excellent) reply:
- You implement HttpSessionListener.
your implementation would have code to run when session expires.
- You register this class in your web.xml:
<listener>
<listener-class>yourPackage.YourListener</listener-class>
</listener>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Session