Languages
[Edit]
EN

Tomcat - set JSESSIONID length / set session id length

2 points
Created by:
JustMike
29880

In this article we would like to show how to setĀ length of valueĀ for JSESSIONIDĀ cookie (session id) in Tomcat Server. The session id length configuration is located inside context.xml.

Simple steps:

  1. 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
  2. openĀ context.xml,
  3. addĀ sessionIdLengthĀ attribute toĀ ManagerĀ element,
    e.g. 50 characters per session id:
    <Manager sessionIdLength="50" />

Example config file:

Example in which place of context.xml file, set length of JSESSIONIDĀ (session id) for Tomcat server.
Example in which place of context.xml file, set length of JSESSIONID (session id) for Tomcat server.
Native Advertising
šŸš€
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

ā¤ļøšŸ’» šŸ™‚

Join