This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to know when server automatically invalidates session

 
aminur rashid
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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???
 
Matthew Phillips
Ranch Hand
Posts: 2676
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Take a look at the HttpSessionListener interface in the J2EE API.
 
aminur rashid
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1055
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes. You need to put
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic