File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Java » JSP
Bookmark "logout problem" Watch "logout problem" New topic

logout problem

Lakshman Khadali

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!

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
I agree. Here's the link:
subject: logout problem
jQuery in Action, 3rd edition