Jul 182012
 Posted by on July 18, 2012 at 5:22 pm Apache Tomcat, Uncategorized Tagged with: ,  Add comments

1. Tomcat is installed as service
2. Tomcat is installed at D:\Softwares folder

In Tomcat the session timeout interval can be changed by updating the property ‘session-timeout‘.
To Change Session timeout in Tomcat follow the steps mentioned below:

1. Goto D:\Softwares\Tomcat\conf folder

2. Open the file ‘web.xml’ in the directory D:\Softwares\Tomcat\conf in wordpad or a proper text editor.
NOTE: In windows 2008 you might need to open the Editor using the “Run as Administrator” option.

3. Search for the text “Session”, you should find a code block similar to the example below:

 <!-- ==================== Default Session Configuration ================= -->
<!-- You can set the default session timeout (in minutes) for all newly -->
<!-- created sessions by modifying the value below. -->


NOTE: The above block might vary from version to version and if modifications are already made.

4. The following line in the code mentions session timeout is 30 minutes


5. Change the following line:


NOTE: 60 means 60 minutes – this can be changed as required based on the requirement.

6. Save the web.xml

7. Restart Tomcat.

1. After changing the session time out Tomcat Restart is required.
2. The variable in view source also shows session timeout as 30 minutes.

© Incase of any copyright infringements please check copyrights page for faster resolutions.

Leave a Reply

Show Buttons
Hide Buttons