简体   繁体   English

是否可以更改JSESSIONID cookie的路径?

[英]Is it possible to change the path of the JSESSIONID cookie?

By default, Glassfish stores the JSESSIONID cookie at the context path, for example "/mysite". 默认情况下,Glassfish将JSESSIONID cookie存储在上下文路径中,例如“ / mysite”。 Is it possible to change this path, for example to "/mysite/admin"? 是否可以更改此路径,例如更改为“ / mysite / admin”? I would like the session to be only valid in part of my website, without having to split it into two separate websites. 我希望该会话仅在我的网站的一部分中有效,而不必将其分为两个单独的网站。

Perhaps the other part of your web site should just be configured as another web context? 也许您网站的另一部分应该只是配置为另一个Web上下文? The general idea is that each web context has its own set of sessions, and you don't share nor split them. 一般的想法是,每个Web上下文都有自己的一组会话,您不共享也不拆分它们。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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