You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Garth Patil <ga...@gmail.com> on 2005/03/01 02:01:41 UTC

Is it possible to use a parameter other than JSESSIONID to maintain session?

Hi,
I'm currently working on a server application using Tomcat, and I've
run into a snag. The clients for the application are custom HTTP
clients (a provider's custom client that won't be changing on our
behalf) that do not have the ability to persist the JSESSIONID in the
request. However, there is already a unique parameter (let's call it
CUSTOMPARAM) that they do send with every POST to us.  I still want to
use Tomcat's sessioning, but I need it to do two things:
1. Use the CUSTOMPARAM as the unique session parameter.
2. Not rewrite the parameter in the response, leaving that control to
my application.
Is there a way to just tell Tomcat in the configuration that I want it
to use a different parameter to identify the session, and that I don't
need it to rewrite it in my response? I've been through the docs, a
book on Tomcat 5, and the mailing list archives, and I haven't been
able to find anything.
Thanks,
Garth

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Is it possible to use a parameter other than JSESSIONID to maintain session?

Posted by Tim Funk <fu...@joedog.org>.
1) Checkout the source
2) issue the command

cd {tomcat src base}
find . -name '*.java' | xargs grep -i jsessionid

This will tell you all the placed jsessionid is used.

-Tim

Garth Patil wrote:

> Changing the name in Globals.java seems to partially work. Now, in
> order to have Tomcat just use that value, and not try to rewrite it
> (or expect it in a specific format), I need to find where in the code
> Tomcat looks up that parameter, and where it rewrites it to the URL.
> Can anyone familiar with the code point me in the right direction?
> Thanks again,
> Garth
> 
> 
>>You *might* be able to recompile tomcat with only changing:
>>jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/Globals.java
>>
>>-Tim
>>
>>Garth Patil <ga...@gmail.com> wrote:
>>
>>Hi,
>>I'm currently working on a server application using Tomcat, and I've
>>run into a snag. The clients for the application are custom HTTP
>>clients (a provider's custom client that won't be changing on our
>>behalf) that do not have the ability to persist the JSESSIONID in the
>>request. However, there is already a unique parameter (let's call it
>>CUSTOMPARAM) that they do send with every POST to us.  I still want to
>>use Tomcat's sessioning, but I need it to do two things:
>>1. Use the CUSTOMPARAM as the unique session parameter.
>>2. Not rewrite the parameter in the response, leaving that control to
>>my application.
>>Is there a way to just tell Tomcat in the configuration that I want it
>>to use a different parameter to identify the session, and that I don't
>>need it to rewrite it in my response? I've been through the docs, a
>>book on Tomcat 5, and the mailing list archives, and I haven't been
>>able to find anything.
>>Thanks,
>>Garth
>>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Is it possible to use a parameter other than JSESSIONID to maintain session?

Posted by Garth Patil <ga...@gmail.com>.
Changing the name in Globals.java seems to partially work. Now, in
order to have Tomcat just use that value, and not try to rewrite it
(or expect it in a specific format), I need to find where in the code
Tomcat looks up that parameter, and where it rewrites it to the URL.
Can anyone familiar with the code point me in the right direction?
Thanks again,
Garth

> You *might* be able to recompile tomcat with only changing:
> jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/Globals.java
> 
> -Tim
> 
> Garth Patil <ga...@gmail.com> wrote:
>
> Hi,
> I'm currently working on a server application using Tomcat, and I've
> run into a snag. The clients for the application are custom HTTP
> clients (a provider's custom client that won't be changing on our
> behalf) that do not have the ability to persist the JSESSIONID in the
> request. However, there is already a unique parameter (let's call it
> CUSTOMPARAM) that they do send with every POST to us.  I still want to
> use Tomcat's sessioning, but I need it to do two things:
> 1. Use the CUSTOMPARAM as the unique session parameter.
> 2. Not rewrite the parameter in the response, leaving that control to
> my application.
> Is there a way to just tell Tomcat in the configuration that I want it
> to use a different parameter to identify the session, and that I don't
> need it to rewrite it in my response? I've been through the docs, a
> book on Tomcat 5, and the mailing list archives, and I haven't been
> able to find anything.
> Thanks,
> Garth
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Is it possible to use a parameter other than JSESSIONID to maintain session?

Posted by Tim Funk <fu...@joedog.org>.
You *might* be able to recompile tomcat with only changing:
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/Globals.java

-Tim

Garth Patil wrote:

> Hi,
> I'm currently working on a server application using Tomcat, and I've
> run into a snag. The clients for the application are custom HTTP
> clients (a provider's custom client that won't be changing on our
> behalf) that do not have the ability to persist the JSESSIONID in the
> request. However, there is already a unique parameter (let's call it
> CUSTOMPARAM) that they do send with every POST to us.  I still want to
> use Tomcat's sessioning, but I need it to do two things:
> 1. Use the CUSTOMPARAM as the unique session parameter.
> 2. Not rewrite the parameter in the response, leaving that control to
> my application.
> Is there a way to just tell Tomcat in the configuration that I want it
> to use a different parameter to identify the session, and that I don't
> need it to rewrite it in my response? I've been through the docs, a
> book on Tomcat 5, and the mailing list archives, and I haven't been
> able to find anything.
> Thanks,
> Garth
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org