wood burning stoves 2.0*
The moose likes JSP and the fly likes what is HttpSessionListener Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "what is HttpSessionListener" Watch "what is HttpSessionListener" New topic
Author

what is HttpSessionListener

kesava chaitanya
Ranch Hand

Joined: Aug 15, 2001
Posts: 140
hi
what is HttpSessionListener?can anybody give me example using httpsessionlistener
Dhananjay Ghanwat
Greenhorn

Joined: Dec 23, 2002
Posts: 27
Hi
An object that implements the HttpSessionListener interface is notified when a session is created or destroyed in its web app context
It can be used to track how many users are currently logged in the system by keeping an counter in the object that implements the Listener and then subsequently incrementing / decrementing it in the appropriate methods
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: what is HttpSessionListener