<%
response.setHeader(\"Cache-Control\",\"no-cache,no-store,must-revalidate\");//HTTP 1.1
response.setHeader(\"Pragma\",\"no-cache\"); //HTTP 1.0
resp
Create a session attribute let's say "valid" and initialize it with any value other then null in the jsp, just after the login credentials were matched. Now create a verify.jsp with the following code:
<%
response.setHeader("Cache-Control", "no-cache, no-store, must-revalidate"); // HTTP 1.1.
response.setHeader("Pragma", "no-cache"); // HTTP 1.0.
if(session.getAttribute("valid")==null)
{
out.println("");
}
%>
Now simply include this jsp file on each jsp page and its done. Do not forget to write "session.invalidate();" in logout.jsp
Hope it will work..!!!