This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Servlets and the fly likes how to know when server automatically invalidates session Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "how to know when server automatically invalidates session" Watch "how to know when server automatically invalidates session" New topic
Author

how to know when server automatically invalidates session

aminur rashid
Ranch Hand

Joined: Sep 21, 2001
Posts: 79
Hi !!!
I am storing a result set in the session .....
Well there is some need to store result set in the sesssion..I am displaying data in my JSP by retrieving the data from the result set...Now I want to close the connection and result set... when the server invalidates the session ......
Any way to do that???


Regards<br />Aminur
Matthew Phillips
Ranch Hand

Joined: Mar 09, 2001
Posts: 2676
Take a look at the HttpSessionListener interface in the J2EE API.


Matthew Phillips
aminur rashid
Ranch Hand

Joined: Sep 21, 2001
Posts: 79
Originally posted by Matthew Phillips:
Take a look at the HttpSessionListener interface in the J2EE API.

Hi ..Thanx for the reply.I cheked the HttpSessionListener Interface .the implementation class must be configured in the deployment descriptor for the web application. So do I have to put an entry for this class in the web xml like we do for servlets?
Anthony Villanueva
Ranch Hand

Joined: Mar 22, 2002
Posts: 1055
Yes. You need to put
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to know when server automatically invalidates session
 
Similar Threads
Mandatory Time-out in a JSP
when a session is invalidated ?
session timeout
Concurrent sessions on multiple web apps?
lifetime of pageContext?