Tomcat 7 session cookie path

无人久伴 提交于 2019-11-27 02:06:51

问题


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.


回答1:


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

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



来源:https://stackoverflow.com/questions/3980392/tomcat-7-session-cookie-path

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!