Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

logout problem

 
Lakshman Khadali
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I have problem with logout
Even though user logout he/she can view last accessed pages which I don't want to be happen.
I invalidate the session in logout.jsp
still there is a problem.
Please help me!

Thanking you!


Regards
Lakshman Khadali
 
Rao Raghu
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try history.replace() method of Javascript.


 
venkatesh pendharkar
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can add the following code in your JSP
<%
response.setHeader("Cache-Control","no-store"); //HTTP 1.1
response.setHeader("Pragma","no-cache"); //HTTP 1.0
response.setDateHeader ("Expires", 0); //prevents caching at the proxy server
%>

by this your current page wont be cached so when you logout from this page & click back;it will show page has expired.
 
prasad kulkarni
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
put the above code in a jsp file & include that file in each of your JSP page. Due to this , not a single JSP page will cached by browser.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic