This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Hello all, I have deployed my servlets in JBOSS server. By default it takes 30 mins as session timeout. There are 2 approaches for this:
1. The HttpSession object has setMaxInactiveInterval() method which can be used to control the session. 2. Also i have heard that i can configure the web.xml for this session timeout value. Am i right about this? Among these 2 approaches which is a better one? Regards, Sajee Joseph
Keeping config stuff in web.xml is always preferable. You don't have to rewrite code to reconfigure your app, and you know there is only one source for config values. [ March 10, 2004: Message edited by: john smith ]
On our in-house intranet, I like to set a short (10 minutes) default session timeout in the web.xml, and when users log in the timeout is increased to one hour. Since most users are primarily interested in viewing openly accessible information which does not require a login, this helps to keep sessions from consuming resources unnecessarily.