Index: lams_central/web/login.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_central/web/login.jsp,v diff -u -r1.51.2.17 -r1.51.2.18 --- lams_central/web/login.jsp 16 Mar 2016 12:13:47 -0000 1.51.2.17 +++ lams_central/web/login.jsp 21 Mar 2016 16:52:24 -0000 1.51.2.18 @@ -174,9 +174,13 @@ <% // invalidate session so a new user can be logged in - SessionManager.removeSession(((UserDTO) SessionManager - .getSession().getAttribute("user")).getLogin(), - true); + HttpSession hs = SessionManager.getSession(); + if (hs != null) { + UserDTO userDTO = (UserDTO) hs.getAttribute("user"); + if (userDTO != null) { + SessionManager.removeSession(userDTO.getLogin(), true); + } + } %>