This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to know the sessionID is alive ?

 
kwwong wong
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For example, when I get the sessionID from database and want to know the session is alive or not. How can I do?
 
Hartmut Ludwig
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by kwwong wong:
For example, when I get the sessionID from database and want to know the session is alive or not. How can I do?

Hi, Kwwong,
I just found out, how it works for Tomcat's Session Manager.
Using org.apache.catalina.session.ManagerBase you can call the method findSession(java.lang.String id) which returns the active Session with the specified session id if there is one otherwise it returns null.
sl
Hartmut
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic