Hey Amit-
You can create a listener class that will watch sessions and execute a
method when a session dies (or on other event triggers). Include the
javax.servlet.http.* package, then write code like this to overwrite the
default sessionDestroyed() constructor:
public void sessionDestroyed(HttpSessionEvent hse) {
log(
"*** Session Destroyed - Id:"+hse.getSession().getId()+" ***");
}
Then add this reference to your class in the web.xml file:
<listener>
<listener-class>myPackage.myClass.mySessionListener</listener-class>
</listener>
Hope this helps.
Drew Falkman
Team Macromedia, JRun
-----Original Message-----
From: Amit r [mailto:cool_jockey@;yahoo.com]
Sent: Thursday, November 07, 2002 8:36 PM
To: JRun-Talk
Subject: Session END action
Hi,
i want to store log off time when user logs out or his
session times out. how can i do it?? I remember in ASp
there was something called global.asa where you can
write your action on session end event. but i'm not
sure how it can be achived in JSP/JRUN.
/Amit
__________________________________________________
Do you Yahoo!?
U2 on LAUNCH - Exclusive greatest hits videos
http://launch.yahoo.com/u2
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=8
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=8
Get the JRun Web Application Construction Kit - the only book written specifically for
JRun developers.
http://www.amazon.com/exec/obidos/ASIN/0789726009/houseoffusion