request.getSession()
HttpSession이 존재하면 현재 HttpSession를 반환하고 존재하지 않으면 새로 세션을 생성.
request.getSession(true)
request.getSession()과 의미가 동일하면 같은 결과다.
request.getSession(false)
HttpSession이 존재하면 현재 HttpSession을 반환하고, 존재하지 않으면 null 값을 반환.
request.getSession(false)인 경우 null을 리턴 하므로 NullPointException이 나올 수 있다.
'개발 > JSP_WEB' 카테고리의 다른 글
에디터 글쓸 때 (0) | 2018.02.12 |
---|---|
href (0) | 2018.02.12 |
request.getSession() (0) | 2018.02.12 |
절대경로랑 상대경로 (0) | 2018.02.12 |
[java.lang.IllegalStateException: getOutputStream() has already been called for this response] with root cause (0) | 2018.02.12 |