Index: lams_central/web/login.jsp =================================================================== diff -u -r7fe28edd2994800c1cbd0a81b19f398191e00f2e -r4e5544e87d146efeab37f27a7176d8d0c7cc9545 --- lams_central/web/login.jsp (.../login.jsp) (revision 7fe28edd2994800c1cbd0a81b19f398191e00f2e) +++ lams_central/web/login.jsp (.../login.jsp) (revision 4e5544e87d146efeab37f27a7176d8d0c7cc9545) @@ -191,7 +191,17 @@ Boolean isSignup = false; if (hs != null) { - UserDTO userDTO = (UserDTO) hs.getAttribute("user"); + UserDTO userDTO = null; + try { + userDTO = (UserDTO) hs.getAttribute("user"); + } catch (Exception e) { + // something is wrong, so try to invalidate the session + try { + hs.invalidate(); + } catch (Exception e1){ + // do nothing if invalidation fails + } + } if (userDTO != null && !userDTO.getLogin().equals(request.getAttribute("login"))) { isSignup = (Boolean) hs.getAttribute("isSignup"); // remove session from mapping