• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to capture session invalidation time.

 
Sumit Suresh Rao
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Whenever a user logs out I can capture the session out time in my code. But suppose if someone's session was invalidated because of in web.xml, how would I capture the invalidation time.
 
Abhay Agarwal
Ranch Hand
Posts: 1376
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you can bind to HttpSessionListener interface and then try to capture your scenario of HTTP Session is being terminated after configured/pre-defined session time out
Give it a try and post your result here.

~ abhay
 
Sumit Suresh Rao
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Abhay,

Works great. Anyone else interested, can refer http://docs.oracle.com/javaee/6/api/javax/servlet/http/HttpSessionListener.html

I did the following


 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic