Discussions

Web tier: servlets, JSP, Web frameworks: logout page in JSP-Urgent

  1. logout page in JSP-Urgent (4 messages)


    In my application ...like...

    After loggin out of my page(by pressing logout button)..if i press the back button of the browser..it takes me to the page visited before ....and it also talking back to the server again.

    I need like after loggin out....we should only get the login page..(Even this serverside.com has this facility).

    can any one please suggest over this on earliest possible time.

    thanks..in advance

    cheers
    Syed Imthias basha

    Threaded Messages (4)

  2. logout page in JSP-Urgent[ Go to top ]

    Hi
     After the user clicks the Logout u should invalidate the session and redirect the page to login.jsp
     <%
         HttpSession loginSession = request.getSession(false);
         session.invalidate();
         response.sendRedirect("login.jsp");
     %>
     See if that works
    Bye
    Asad
  3. logout page in JSP-Urgent[ Go to top ]

    Hi Asad,

    It works fine ...but after getting the login page , if we press the back button of the browser.....we will get internal error.

    I need like...even if you press the back button....the same page has to appear( by some means)

    suggest me somepoints regarding this.

    cheers
    Syed Imthias Basha
  4. logout page in JSP-Urgent[ Go to top ]

    Hi Syed
     When u expire the session, the user can still see the last page from the cache by clicking the back button of browser. But cannot update or enter data because the session is expired. You can call the error page or print a customize message to re-login again or expire the previous page after the user is logged out.
    See if it works, if anybody has better solution plz comment.
    Bye
    Asad
  5. logout page in JSP-Urgent[ Go to top ]

    Hi Asad,

    thanks alot......got it.

    cheers
    Syed Imthias Basha