How to logout from a session??
843841Apr 25 2007 — edited May 9 2007I tried using session.invalidate() function and session.removeValue() as well,but the problem is when i click on logout button and then try to access the restricted pages some of the pages prompt for login whereas others do not...Also next time when i login again and then logout,then session doesn't expire at all and all restricted pages are accessible...I am able to figure out why this is happening...Below are the few lines of code which i am using..I have made a logout servlet which is requested evrytime the user clicks on the logout button...
session.invalidate()
RequestDispatcher dispatcher=getServletContext().getRequestDispatcher("/html/frontpage.html");
dispatcher.forward(request,response);
Please help as i am really stuck ..Thanx