request.getSession(true)和request.getSession(false)的区别
request.getSession(true):若存在会话则返回该会话,否则新建一个会话。
request.getSession(false):若存在会话则返回该会话,否则返回NULL
本文解析了request.getSession(true)与request.getSession(false)的区别。前者会在没有会话时创建新会话,后者则仅返回现有会话,不存在时返回NULL。
request.getSession(true)和request.getSession(false)的区别
request.getSession(true):若存在会话则返回该会话,否则新建一个会话。
request.getSession(false):若存在会话则返回该会话,否则返回NULL
2843
1万+

被折叠的 条评论
为什么被折叠?