Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Session - logout problem

 
Jahnvi Vyas
Ranch Hand
Posts: 36
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am developing a intranet application using JSP. In that one user logs out and when another user logs in that and if he presses back button of web browser then it shows previous users pages.

To disallow this, in log out process i write session.invalidate() method and i am checking at every page whether session is new or not with session.isNew(). But this doesnt work.

Anybody has idea why it happens. Or any other solution??

Thanks..

- Jahnvi
 
yue zhang
Greenhorn
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
try this :
<%
response.setHeader("Pragma","No-cache");
response.setHeader("Cache-Control","no-cache");
response.setDateHeader("Expires", 0);
%>
may be can help you
 
yue zhang
Greenhorn
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
this article is what you need

http://www.javaworld.com/javaworld/jw-09-2004/jw-0927-logout.html
 
Jahnvi Vyas
Ranch Hand
Posts: 36
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thankz Yue!
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic