Bootstrap FreeKB - Tomcat - Session expiration (timeout)
Tomcat - Session expiration (timeout)

Updated:   |  Tomcat articles

You may want to first read about the difference between a session and a cookie.

The session timeout is set in the JVMs web.xml file. Typically, the default setting is 30 (minutes). If you change the session timeout value, you will have to restart the JVM for the change to take effect.

<session-config>
  <session-timeout>30</session-timeout>
</session-config>

 

For demonstration purposes, the screen shot below shows a Java app displaying the session ID number.

 

Then, after 30 minutes, the app has a new session ID number, since the prior session timed out after 30 minutes.




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter 68fcbb in the box below so that we can be sure you are a human.