• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to change session tracking lifetime in JSP  RSS feed

 
Richard Yin
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have some JSP pages where I do session tracking.But I don't know how to change the lifetime for session. I have heard that on Tomcat server the lifetime is about 30 minutes. So can I change that by changing web.xml or server.xml inside tomcat? Thanx for your reply.
 
Dave Vick
Ranch Hand
Posts: 3244
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hy1946
Welcome to the Java Ranch, we hope you�ll enjoy visiting as a regular however,
your name is not in keeping with our naming policy here at the ranch. Please change your display name to an appropriate name as shown in the policy.
Thanks again and we hope to see you around the ranch!!

For your question, I think the setMaxInactiveInterval method of the HttpSession class will do what you want.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!