问题描述
我有问题.在玻璃鱼的servlet
中,我调用方法request.getSession(false)
.它应该return null
.但是,总会有一个session
返回.此外,如果我invalidate
在调用getSession(false)
之前的session
-returns null
.这意味着其他东西会创建session
!那会是什么呢?servlet
从.jsp页面重定向.我在用玻璃鱼.
I have a problem. In my servlet
in glassfish I call the method request.getSession(false)
. It should return null
. But instead there is always a session
returned.Moreover, if I invalidate
the session
right before the call to getSession(false)
- it returns null
. It means something else creates the session
!What could that be?The servlet
is redirected from the .jsp page. I am using the glassfish.
推荐答案
您是否已在JSP中禁用了会话?在您的jsp顶部:
Have you disabled the session in JSP? At the top of your jsp:
<%@ page language="java" session="false"%>
这篇关于HttpSession request.getSession(false)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!