[英]Tomcat sets cookie JSESSIONID spontaneously
I have a spring webapp running on tomcat. 我有一个在tomcat上运行的spring webapp。 I never set any sessions in my code.
我从未在代码中设置任何会话。 There is only this line :
只有这一行:
HttpSession session = httpServletRequest.getSession(false);
if( session != null )
{
log.debug("session is not null");
}
These lines logs, session is not null
, which makes no sense. 这些行记录,
session is not null
,这没有任何意义。 I also checked, a cookie named JSESSIONID
is being set. 我还检查了一个名为
JSESSIONID
的cookie。 But as you can see above I give false enter code here
argument to getSession
. 但是正如您在上面看到的那样,我
enter code here
将false伪enter code here
赋予getSession
参数。 How is this possible ? 这怎么可能 ?
我错过了一个事实,除非您输入<% session=false %>
jsp页面会创建一个会话。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.