FAQ

[Tomcat-users] Different session id per page

Rainer Jung
Dec 31, 2011 at 10:47 pm

On 31.12.2011 18:37, Caldarale, Charles R wrote:
From: Jerry Malcolm
Subject: Re: Different session id per page
If there was a way to tell TC to use "/" as the path, that would
work in this case.
Look at the sessionCookiePath attribute for<Context> and see if that will help:

http://tomcat.apache.org/tomcat-7.0-doc/config/context.html#Common_Attributes
Yes, you can change the path of the session cookie used by Tomcat, and
in case you need to change it to "/", you can also change the name of
the session cookie to make sure you won't run into a conflict with
another Java webapp session cookie used on the same server.

The alternative is rewriting the cokie at the reverse proxy (Apache Web
Server), using mod_headers or to cookie rewriting feature if mod_proxy.
A cookie set by the server (Tomcat) is just a "Cookie" response header,
which you can change dynamically at the reverse proxy to account for
reversing your URL rewriting for requests.

Some info about that is also avilable at

http://tomcat.apache.org/connectors-doc/generic_howto/proxy.html#URL%20Rewriting

If you are using mod_proxy, please have a look at the mod_proxy docs.

Regards,

Rainer


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

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions