简体   繁体   中英

Tomcat 8 how to remove sessionCookieName from URL

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"?

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM