If you use the tomcat 5.0 / 5.5 / 6.0 container, the cookie generated by the tomcat session manager for session tracking (JSESSIONID) is a cookie (browser-only cookie) instead of a persistent cookie (write to disk). This is because the session manager executes (hardcoded) setMaxAge (-1), so the generated HTTP response contains: Set-Cookie: JSESSIONID=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX; Path=/ Set-Cookie: JSESSIONID=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX; Path=/ and not Expire= date .
So, when the browser is closed (all browser windows or just a window containing a cookie, depending on the variuos browser versions), the cookie - and the session - are lost. [*]
This has nothing to do with <session-timeout> , which is a parameter that tells the tomcat server-side session manager to expire standby sessions for longer than specified.
[*] they will still be stored on the server-side drive until the session timeout, but there will be no request with the activation of their cookie.
source share