EN
Tomcat - set JSESSIONID length / set session id length
2 points
In this article, we would like to show how to set the length of value for JSESSIONID
cookie (session-id) in Tomcat Server. The session-id length configuration is located inside context.xml
.
Simple steps:
- go to Tomcat configuration directory,
e.g. in Windows it can be:
C:\Program Files\Apache Software Foundation\apache-tomcat-8.0.46\conf
e.g. in Debian Linux it can be:
/var/lib/tomcat8/conf/context.xml
- open
context.xml
file, - add
sessionIdLength
attribute toManager
element,e.g. 50 bytes per session id:
<Manager sessionIdLength="50" />
Example context.xml
file:
