Open bsoetaer opened 9 years ago
Note that any code like:
// Return user to login page if session expired. Integer person_id = (Integer) session.getAttribute("person_id"); String cls = ""; if(person_id == null) response.sendRedirect("../login/login.jsp"); else cls = (String) session.getAttribute("class"); if(!cls.equals("a")) response.sendRedirect("../login/home.jsp");
Should be changed to:
// Return user to login page if session expired. Integer person_id = (Integer) session.getAttribute("person_id"); String cls = ""; if(person_id == null) response.sendRedirect("../login/login.jsp"); else { cls = (String) session.getAttribute("class"); if(!cls.equals("a")) response.sendRedirect("../login/home.jsp"); }
This is because the interpreter still evaluates the lines after the first response.sendRedirect and the page will become in an invalid state if 2 sendRedirects in a row are registered.
Login, Report Generating, User Management, and Data Analysis modules complete.
Note that any code like:
Should be changed to:
This is because the interpreter still evaluates the lines after the first response.sendRedirect and the page will become in an invalid state if 2 sendRedirects in a row are registered.