• 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

tomcat session timeout

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi
in JSP pages i am storing some values in session variables.
alos beans are of session scope.I am using tomcat as servelt engine. Is there any way to control session timeout?
How can i increase the timeout beyond 30 min default for tomcat.
regards
sharang
 
Ranch Hand
Posts: 1514
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There is a method setMaxInactiveInterval. It sets the amount of time a session should go without access before being automatically invalidated.

Bosun
 
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Change web.xml in <TOMCAT_HOME>/conf directory's <session-timeout> tag. By default it is 30. But it will be applicable to all session, i.e. all serverlet/JSP running under that tomcat server.
regards
holl@
 
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Bosun Bello, I want to enquire about one thing that do we have to call thie method (setMaxInactiveInterval) every time we request the session or just once when we create the session.
thanks
gaurav
 
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
- I think it's just each time u create the session.
 
reply
    Bookmark Topic Watch Topic
  • New Topic