24

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.

Juriy
  • 5,009
  • 8
  • 37
  • 52

1 Answers1

40

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

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

Vadim
  • 5,154
  • 2
  • 20
  • 18