request.getSession() 与 request.getSession(true/false)区别
getSession是返回当前用户的会话对象
request.getSession() 与 request.getSession(true) 在效果上没有区别。
request.getSession(true) ,“当前用户的会话对象”为空(第一次访问时)则创建一个新的会话对象返回;
request.getSession(false) ,“当前用户的会话对象”为空,则返回null(即不自动创
原创
2017-12-22 17:37:33 ·
4301 阅读 ·
0 评论