Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

executing code when session dies  RSS feed

 
Kieth Nogins
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
I want to let my web application know when a session dies. Is there a way
to execute some code whenever the session dies for whatever reason?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could implement a session listener.
 
Kieth Nogins
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
who???
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here's the steps I would take:

1. Upon reading that someone said I should use a "session listener", I would open a browser window and do a net search on "session listener"

2. Seeing that first result (at least on a google search) references a class named HttpSessionListener, I do a search on that.

3. This yields the javaoc for the HttpSessionListener class

4. I read that javadoc

5. Knowledge happens


P.S. A google search of the JavaRanch forums also yields 105 hits.
[ May 06, 2006: Message edited by: Bear Bibeault ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!