Tomcat 7 session cookie path

28,789

Juts put the sessionCookiePath="/" attribute into your context.xml root node:

<Context ... sessionCookiePath="/" > ... </Context>

Share:
28,789
Juriy
Author by

Juriy

Interested in Rich JS and RIA.

Updated on July 11, 2022

Comments

  • Juriy
    Juriy almost 2 years

    I'm having a huge problem with my application and Tomcat 7. My application needs to set session cookie to "/" path instead of "/context" path. In tomcat 6 it was a matter of adding another property to Connector (emptySessionPath="true") and Tomcat 7 doesn't recognize this thing. I know that Servlet 3.0 spec allows to configure it on per-context basis, but I couldn't make it work with Tomcat 7. It still adds the context path instead of "/".

    I will be very grateful for the receipt on how to do it.