aspose file tools
The moose likes Servlets and the fly likes logging on session timeout/destruction ? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Servlets
Reply Bookmark "logging on session timeout/destruction ? " Watch "logging on session timeout/destruction ? " New topic
Author

logging on session timeout/destruction ?

Anupreet Arora
Ranch Hand

Joined: Jun 17, 2003
Posts: 81
I get a very frequent problem in my web application, which relates to a user's session timing out.

Is it somehow possible to determine when a particular user's session was timed out by the app server ?
Is it possible to maybe write a System.out.println() or a logger statement, saying that the "HttpSession of XYZ user timed out at DDMMYY HH:MI:SS", just before the session gets destroyed?

I am aware that the newer specifications for servlets do offer certain classes like HTTPSessionListner and HTTPSessionAttributeListner.. but my application is on specification 2.1 of servlets, which doesn't have these classes.

Any ideas people ?

Best Regards,
Anupreet
Luke Knightley
Greenhorn

Joined: Sep 10, 2004
Posts: 3
HttpSessionBindingListener is in the 2.1 API

http://java.sun.com/products/servlet/2.1/api/javax.servlet.http.HttpSessionBindingListener.html#_top_
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17225
    
    1

"Y bear"-
Welcome to the JavaRanch! Please adjust your displayed name to meet the

JavaRanch Naming Policy.

You can change it

here.

Thanks! and welcome to the JavaRanch!

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: logging on session timeout/destruction ?
 
Similar Threads
How Do I Use Servlet Filter To Check Session Time-out?
Session Timeout Notification
Login Session Time out
Frames Problem
Detecting expired sessions