I am setting and getting the session attributes on login page, when i logout the page and press the back button it goes to home page again.
Here is my code,
::::::::::::::::::::::::::**sessionaction.jsp**:::::::::::::::::::::::::::::::::::::: <%@page import="java.util.*" %> <% String str = request.getParameter("UserName"); session.setAttribute("sessUserName", request.getParameter("Password")); %> <% if (session.getAttribute("sessUserName").equals("")) { response.sendRedirect("login.jsp"); %> <% } else { response.sendRedirect("home.jsp"); } %> ::::::::::::::::::::::::::**logout.jsp**:::::::::::::::::::::::::::::::::::::: <%@page import="java.util.*" %> <% //session.invalidate(); session.removeAttribute("sessUserName"); %> You have logged out. Please <a href="login.jsp"><b>Login</b></a> Kindly guide me.