Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有个问题。在我servlet的 glassfish 中,我调用了方法request.getSession(false)。它应该return null。但相反,总是有一个session返回。而且,如果我invalidate在session调用之前对getSession(false)-它returns null。这意味着其他东西创造了session!那会是什么?servlet是从 .jsp 页面重定向的。我正在使用玻璃鱼。
servlet
request.getSession(false)
return null
session
invalidate
getSession(false)
returns null
您是否在 JSP 中禁用了会话?在您的 jsp 顶部:
<%@ page language="java" session="false"%>