You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by André-John Mas <an...@gmail.com> on 2008/10/06 19:12:17 UTC
Ability to rename JSESSIONID to something else
Hi,
We have recently encountered an issue where running two separate
Tomcat instances behind a single HTTPD server would cause issues with
the JSESSIONID cookie, because each is over-writing the name of the
other. Having looked in Bugzilla I found the following ticket for
Tomcat 5:
https://issues.apache.org/bugzilla/show_bug.cgi?id=42419
I provided a patch for the issue, and would like to know whether this
would be accepted?
I have also opened a separate ticket on this same issue for Tomcat 6,
to include an equivalent patch:
https://issues.apache.org/bugzilla/show_bug.cgi?id=45951
André-John
--
mailto:andrejohn.mas@gmail.com
Re: Ability to rename JSESSIONID to something else
Posted by Mladen Turk <mt...@apache.org>.
Filip Hanik - Dev Lists wrote:
> very true, didn't realize so many places referenced it, however, this
> gets confusing
>
> - public static final String SESSION_COOKIE_NAME = "JSESSIONID";
> + public static final String SESSION_COOKIE_NAME =
> + System.getProperty("org.apache.catalina.JSESSIONID",
> "JSESSIONID");
>
>
> /**
> * The name of the path parameter used to pass the session identifier
> * back and forth with the client.
> */
> - public static final String SESSION_PARAMETER_NAME = "jsessionid";
> + public static final String SESSION_PARAMETER_NAME =
> + System.getProperty("org.apache.catalina.jsessionid",
> "jsessionid");
>
>
> two system properties, and the only difference is the case? lets not do
> that!
>
Agreed. This should probably be session cookie and session path
We have the liberty to choose the property name thought.
In new mod_jk I made that as worker.xxx.session_cookie and
worker.xxx.session_path respectively.
It's not yet released so it would be cool if we could sync
the naming.
Regards
--
^(TM)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: Ability to rename JSESSIONID to something else
Posted by André-John Mas <an...@gmail.com>.
On Mon, Oct 6, 2008 at 1:54 PM, Filip Hanik - Dev Lists
<de...@hanik.com> wrote:
> very true, didn't realize so many places referenced it, however, this gets
> confusing
>
> - public static final String SESSION_COOKIE_NAME = "JSESSIONID";
> + public static final String SESSION_COOKIE_NAME =
> + System.getProperty("org.apache.catalina.JSESSIONID", "JSESSIONID");
>
>
> /**
> * The name of the path parameter used to pass the session identifier
> * back and forth with the client.
> */
> - public static final String SESSION_PARAMETER_NAME = "jsessionid";
> + public static final String SESSION_PARAMETER_NAME =
> + System.getProperty("org.apache.catalina.jsessionid", "jsessionid");
>
>
> two system properties, and the only difference is the case? lets not do
> that!
I would go for:
org.apache.catalina.SESSION_COOKIE_NAME
org.apache.catalina.SESSION_PARAMETER_NAME
the thinking here is that we are specifying the name of the constant
who's value we wish to change, the names are distinct and we also
avoid the case issue.
Andre
--
mailto:andrejohn.mas@gmail.com
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: Ability to rename JSESSIONID to something else
Posted by Filip Hanik - Dev Lists <de...@hanik.com>.
very true, didn't realize so many places referenced it, however, this
gets confusing
- public static final String SESSION_COOKIE_NAME = "JSESSIONID";
+ public static final String SESSION_COOKIE_NAME =
+ System.getProperty("org.apache.catalina.JSESSIONID", "JSESSIONID");
/**
* The name of the path parameter used to pass the session identifier
* back and forth with the client.
*/
- public static final String SESSION_PARAMETER_NAME = "jsessionid";
+ public static final String SESSION_PARAMETER_NAME =
+ System.getProperty("org.apache.catalina.jsessionid", "jsessionid");
two system properties, and the only difference is the case? lets not do that!
Filip
Mark Thomas wrote:
> Filip Hanik - Dev Lists wrote:
>
>> I don't see an issue with that patch, looks good to me
>>
>
> http://people.apache.org/~jfclere/patches/jsessionid.patch is more complete
> but as Remy pointed out it has a couple of issues.
>
> As it happens, I am looking at this now. I'll commit something to trunk and
> then propose a backport to 5/6.
>
> I have given up on my configuration per manager idea for now.
>
> Mark
>
>
>> Filip
>>
>> André-John Mas wrote:
>>
>>> Hi,
>>>
>>> We have recently encountered an issue where running two separate
>>> Tomcat instances behind a single HTTPD server would cause issues with
>>> the JSESSIONID cookie, because each is over-writing the name of the
>>> other. Having looked in Bugzilla I found the following ticket for
>>> Tomcat 5:
>>>
>>> https://issues.apache.org/bugzilla/show_bug.cgi?id=42419
>>>
>>> I provided a patch for the issue, and would like to know whether this
>>> would be accepted?
>>>
>>> I have also opened a separate ticket on this same issue for Tomcat 6,
>>> to include an equivalent patch:
>>>
>>> https://issues.apache.org/bugzilla/show_bug.cgi?id=45951
>>>
>>> André-John
>>>
>>>
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: dev-help@tomcat.apache.org
>>
>>
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: Ability to rename JSESSIONID to something else
Posted by Mark Thomas <ma...@apache.org>.
Filip Hanik - Dev Lists wrote:
> I don't see an issue with that patch, looks good to me
http://people.apache.org/~jfclere/patches/jsessionid.patch is more complete
but as Remy pointed out it has a couple of issues.
As it happens, I am looking at this now. I'll commit something to trunk and
then propose a backport to 5/6.
I have given up on my configuration per manager idea for now.
Mark
>
> Filip
>
> André-John Mas wrote:
>> Hi,
>>
>> We have recently encountered an issue where running two separate
>> Tomcat instances behind a single HTTPD server would cause issues with
>> the JSESSIONID cookie, because each is over-writing the name of the
>> other. Having looked in Bugzilla I found the following ticket for
>> Tomcat 5:
>>
>> https://issues.apache.org/bugzilla/show_bug.cgi?id=42419
>>
>> I provided a patch for the issue, and would like to know whether this
>> would be accepted?
>>
>> I have also opened a separate ticket on this same issue for Tomcat 6,
>> to include an equivalent patch:
>>
>> https://issues.apache.org/bugzilla/show_bug.cgi?id=45951
>>
>> André-John
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: Ability to rename JSESSIONID to something else
Posted by Filip Hanik - Dev Lists <de...@hanik.com>.
I don't see an issue with that patch, looks good to me
Filip
André-John Mas wrote:
> Hi,
>
> We have recently encountered an issue where running two separate
> Tomcat instances behind a single HTTPD server would cause issues with
> the JSESSIONID cookie, because each is over-writing the name of the
> other. Having looked in Bugzilla I found the following ticket for
> Tomcat 5:
>
> https://issues.apache.org/bugzilla/show_bug.cgi?id=42419
>
> I provided a patch for the issue, and would like to know whether this
> would be accepted?
>
> I have also opened a separate ticket on this same issue for Tomcat 6,
> to include an equivalent patch:
>
> https://issues.apache.org/bugzilla/show_bug.cgi?id=45951
>
> André-John
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org