bsoetaer / CMPUT391Project

0 stars 0 forks source link

Update all navigation bars with correct links. #23

Open bsoetaer opened 9 years ago

bsoetaer commented 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.

bsoetaer commented 9 years ago

Login, Report Generating, User Management, and Data Analysis modules complete.