my dog learned polymorphism*
The moose likes JSP and the fly likes logout problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "logout problem" Watch "logout problem" New topic
Author

logout problem

Lakshman Khadali
Greenhorn

Joined: Feb 08, 2007
Posts: 4
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

Joined: Jan 05, 2007
Posts: 100
Try history.replace() method of Javascript.




RAGHU<br /> <br />"When the going gets tough, the tough get going"
venkatesh pendharkar
Ranch Hand

Joined: Apr 29, 2006
Posts: 106
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

Joined: Mar 19, 2006
Posts: 66
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.


scjp, scwcd
 
Consider Paul's rocket mass heater.
 
subject: logout problem
 
Similar Threads
Browser Closing without signout from site
problem in logout procedure
back button in mozilla
how to Invalidate session in Jsp
path of jsp is repeated and i get error jsp not found