i just want help i have developed an jsp/servlet project on which i have created logout controller named LogOut.java @/servlet/Account/LogOut code is here
public static boolean doLogOut(HttpServletRequest request)
{
boolean Result = false;
if(request.getSession(false) != null)
{
request.getSession().invalidate();
Result = true;
}
return Result;
}
and in servlet i'm forwarding to "/" url so the most common problem is on after logout if i press Back button in browser it shows previous page and i don't want to show it so what should i do before or after logout in servlet
i have got some thing like
add the following code to all ur .jsp pages :-
<%
response.setHeader("cache-control","no-cache");
response.setHeader("Pragma","no-cache");
response.setDateHeader("Expires",0);
%>
This thing is working for me even with the Back Button
is this ok i means i have to do it in all pages if i don't use the listener or some thing can be do...????????????