tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Assaf Flatto <>
Subject Re: changing the length of the jsessionid
Date Mon, 06 Nov 2006 09:51:04 GMT
I took the sources of the 5.0.30 tomcat and made the changes, recompiled 
the RPM and installed it on  one of my QC servers .
the session id that is generated from the tomcat is indeed 30 chars but 
now it seems that the jvmroute and the balancer in front of it are not 
adding the ".x" to the jsessionid .

my balancer config is :

ProxyPass / balancer://mycluster/  lbmethod=bytraffic 
stickysession=jsessionid nofailover=Off
   <Proxy balancer://mycluster >
        BalancerMember ajp:// ttl=60  route=1
#        BalancerMember ttl=60  route=2
#        BalancerMember ajp:// ttl=60  route=3
        Order Allow,Deny
        Allow from all

I specifically changed the ajp port to 8081 - it is not an error , the 
connector on the tomcat is defined :

<Connector port="8081" enableLookups="false" redirectPort="8443" 
protocol="AJP/1.3" />

and the jvmroute is defined :
<Engine name="Catalina" defaultHost="" debug="0" jvmroute="1">

but the end result is  cookie: JSESSIONID=FB5B5218F8A9021652FDE8C270F991

any guess why that is ?


Christopher Schultz wrote:
> Assaf,
>> Does anyone know how i can shorten the length of the jsessionid from 32
>> chars to 30 ?
> In Tomcat 4.1, the class org.apache.catalina.session.ManagerBase creates
> sessions and assigns ids to them. The source I'm looking at right now
> uses a message digest algorithm (it's not clear which one, but probably
> MD5) which returns a fixed-width string.
> I suppose you could modify this file directly and re-package it with
> your deployment, or possibly even subclass it and somehow install it
> without having to modify Tomcat's internals (I don't know how to specify
> which Manager gets used by Tomcat... someone else will have to answer that).
> Any particular reason you want to shorten the session id?
> -chris

To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message