1

i'm trying to change the path of the session cookie path in Tomcat. This cookie is set into the response automatically after i call request.getSession(true). The problem is i tried to add/change the Set-Cookie header or somehow add another JSESSIONID cookie in my servlet but it doesn't seem to get stored in the browser. Can i do this without changing Tomcat code?

Thanks, Teo

Sandman
  • 2,577
  • 2
  • 21
  • 32
  • I think this has been asked here http://stackoverflow.com/questions/3980392/tomcat-7-session-cookie-path – reevesy May 18 '12 at 09:47
  • I'm trying to do the opposite basically, i want to set multiple different, paths, depending on what 'subapp' i'm accessing... So i don't want the same session for different paths... – Sandman May 18 '12 at 09:50

1 Answers1

0

The path of the session cookie matches the path of the application. If you modify it you will break the behaviour of the container. What are you really trying to achieve?

Pidster
  • 628
  • 4
  • 9
  • I want to only have one .war file, but different sessions for, let's say, /something and /somethingelse . I don't want them to overlap... Btw i think you answered a similar question of mine on the Tomcat mailing list. You suggested i have multiple .wars there, but i can't really, a lot of stuff is depending on it just being one war. Isn't there some way to do this with a single .war? – Sandman May 21 '12 at 10:49