I am developing a web application using struts2 and jsp. I want to implement logout functionality in it. Although, I am able to remove the session but the browser's back button sends me back to the previously visited pages. I added the following code in each of the jsp file for preventing the caching. But this is not working. Kindly help.. So that after logout one cannot access the pages. Code :-
<%
response.setHeader("Cache-Control","no-cache"); // HTTP 1.1
response.setHeader("Pragma","no-cache"); //HTTP 1.0
response.setDateHeader ("Expires", 0);
%>
I have added this code in head tag of each and every jsp page.