session tracking for logOut

<%
        String email=(String)session.getAttribute("email");
        
        //redirect user to home page if already logged in
        if(email!=null){
            response.sendRedirect("home.jsp");
        }
        String status=request.getParameter("status");
        
        if(status!=null){
            if(status.equals("false")){
                   out.print("Incorrect login details!");                       
            }
            else{
                out.print("Some error occurred!");
            }
        }
        %>


resource:

Comments

Popular posts from this blog

Lab Network 2024

Step to publish your static html web page to GitHub

Tutorial OOP(reversion java)