• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

logging on session timeout/destruction ?

 
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HttpSessionBindingListener is in the 2.1 API

http://java.sun.com/products/servlet/2.1/api/javax.servlet.http.HttpSessionBindingListener.html#_top_
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"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
 
reply
    Bookmark Topic Watch Topic
  • New Topic