This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JSP and the fly likes Session - 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 "Session - logout problem" Watch "Session - logout problem" New topic
Author

Session - logout problem

Jahnvi Vyas
Ranch Hand

Joined: May 03, 2006
Posts: 36
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

Joined: May 15, 2006
Posts: 5
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

Joined: May 15, 2006
Posts: 5
this article is what you need

http://www.javaworld.com/javaworld/jw-09-2004/jw-0927-logout.html
Jahnvi Vyas
Ranch Hand

Joined: May 03, 2006
Posts: 36
Thankz Yue!
 
wood burning stoves
 
subject: Session - logout problem
 
Similar Threads
how to use session
Session
session info into db
Session Deletion help.
sessions