Thanks for your answer ! That's what I have done. HttpSession.getCreationTime() don't work when the session is destroyed (in Tomcat 4.0.3), it throws an IllegalStateException and the specs are not clear on that point.
Frank AFRIAT ----- Original Message ----- From: "Jakarta Tomcat Newsgroup" <@[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, July 03, 2002 4:40 PM Subject: Re: Impossible to calculate session duration ? > Subject: Re: Impossible to calculate session duration 1 2 3 4 5 6 7 8 9 > From: "Dan Paraschiv" <[EMAIL PROTECTED]> > === > If you want to find out how long a session lives you > could try this: > > 1. When you create the session store somewhere the creation time > 2. Create an object that implements the interface > HttpSessionBindingListener. > 3. When the method valueUnbound(HttpSessionBindingEvent event) is called > in your object you can calculate the life time. > > Check the Servlet API for details. I think that you can probably skip the > first step and use HttpSession.getCreationTime() on your > valueUnbound(HttpSessionBindingEvent event) method. > > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
