How to logout from a session?
I 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

