Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Session timeout - How to set for an application?

 
Alamu Vinai
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can I set the session time out value for the entire application? I know how to do for a single session. But how to do for all sessions in any application? Should I modify the xml file?
 
Mark Simms
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The application-wide setting can be controlled in the deployement descriptor file: web.xml
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
Remember, there is usually a default web.xml and then one that applies to your application ...which can override the default settings.
Note: there is also a ServletConfig method for changing this setting dynamically.
 
Alamu Vinai
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply. Now I understand how to set session timeout for all sessions.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic