Tomcat 8 how to remove sessionCookieName from URL

蓝咒 提交于 2019-12-24 01:15:31

问题


I have changed the sessionCookieName in context.xml

<Context sessionCookieName="SESSIONID">
    ...
</Context>

Edit after @denov's answer: In my web.xml I'm using this configuration:

<session-config>
    <tracking-mode>COOKIE</tracking-mode>
</session-config>

Now I can see the new cookie name in my url:

http://localhost:8080/profile;SESSIONID=FEB1091BD2E132362FFDE8FE354F4CEA

It happen never if I'm using default tomcat settings (JSESSIONID)

So how to disable this "feature"?


回答1:


https://tomcat.apache.org/tomcat-8.0-doc/config/context.html

<Context sessionCookieName="SESSIONID" cookies="true">
...
</Context>


来源:https://stackoverflow.com/questions/36405296/tomcat-8-how-to-remove-sessioncookiename-from-url

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