April 14, 2009 at 4:07 PM
If you want to make session timeout programatically, you can use the method setMaxInactiveInterval() method of interface HTTPSession that sets the maximum time in seconds before a session becomes invalid. Its syntax is:
And if you want to specify the timeout of a session in the deployment descriptor of your web application (web.xml)then do the following:
Here time is expressed in minutes.