You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by da...@kentor.se on 2001/02/07 09:56:08 UTC

Length of JSESSIONID ?

In order to configure our load balancer to enable cookie based
persistence we have to set the name of the cookie the load balancer will
look for, but we also need to set the number of characters in that
string that are unique. So my question is: What is the length of the
JSESSIONID cookie? I snooped and counted to 26 characters. Is it a fixed
length?

Regards,
David


Re: Length of JSESSIONID ?

Posted by Kief Morris <ki...@bitbull.com>.
david.svanberg@kentor.se typed the following on 09:56 AM 2/7/2001 +0100
>In order to configure our load balancer to enable cookie based
>persistence we have to set the name of the cookie the load balancer will
>look for, but we also need to set the number of characters in that
>string that are unique. So my question is: What is the length of the
>JSESSIONID cookie? I snooped and counted to 26 characters. Is it a fixed
>length?

The specification doesn't say anything about the length of the ID. The code
to create session ID's in Tomcat 3.2 is org.apache.tomcat.util.SessionIdGenerator.
A comment at the top says, "This class generates a unique 10+ character id."
You could look through the code to figure out which parts of the string are
likely to be unique, but you'd be in danger of breaking your load balancer
as soon as somebody tweaked that bit of code. It might be safest to assume
the whole thing is unique.

Kief