File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes Session problem plz Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » JSP
Reply locked New topic
Author

Session problem plz

s. anitha
Greenhorn

Joined: Jan 18, 2005
Posts: 18
after pressing logout i invalidated the session.then i press the

back i show that the page has expired.

using this code:

<% response.setHeader("Pragma","no-cache");%>
<% response.setHeader("Cache-Control","no-store");%>
<% response.setDateHeader("Expires",-1);%>

the expired page is showing using this code

my problem is if i press refresh or f5,it

is showing the pages .how to avoid these.plz help me.
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

Are you sure your logout is working? Try adding some logging so you can see if the second request (when you hit F5) is causing the code to execute. The only way you can get the page to be shown again is if the browser requests the page and the server returns the page, so you should make sure you're not returning the page.
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

That's a nice piece of 'no cache' code, but are you sure you send it with every page sent to the user while they are logged in? It's not good enough to send it after the fact, useless even.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61413
    
  67

Anitha, please do not post the same question more than once.

thanks,
bear
Forum bartender
[ January 18, 2005: Message edited by: Bear Bibeault ]

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Session problem plz