강의

멘토링

커뮤니티

Inflearn Community Q&A

fdghsdfbh's profile image
fdghsdfbh

asked

Learn Spring MVC 5 by Making It with Yoon Jae-seong

52nd Top Menu Processing and Logout

로그아웃

Written on

·

301

0

로그아웃시 

loginUserBean.setUserLogin(false);

이렇게하고

세션영역에 데이터도 같이 지울려면 어떻게 해야되나요?

MVCjavaXMLspring

Answer 1

1

session.removeAttribute("저장하신 로그인아이디"); 하시면 세션에 저장된 로그인아이디만 지워지고, session.invalidate();하시면 세션이 종료되면서 세션에 저장된 값들이 전부 날라갑니다.  저도 님글 보고 궁금해서 검색해봤네요.

https://jhonnywest.tistory.com/47 여기 블로그 봐보세여

fdghsdfbh's profile image
fdghsdfbh

asked

Ask a question