This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes Servlets and the fly likes Session Tracking Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Session Tracking" Watch "Session Tracking" New topic

Session Tracking

Vishal Manchanda

Joined: Aug 27, 2003
Posts: 1
How can we make the "Page Expired" option when user
> clicks on the Back button of the browser?(I am talking
> with respective Session tracking)
> I mean after coming to Logout page,instead of
> Logging out,if the user clicks on the Back button of
> the browser,it again opens returns main page without logging in.
I'm using JSP
session.invalidate is not working.
then i tried clearing the cache using
response.setDateHeader ("Expires", 0);
but now the exact situation is
if I login I enter the main page and then logging off brings me back to login page.
Now pressing the browser back button it shows something like
"page has expired press refresh button"
pressing the refresh button a dialog asks retry or cancel
if I press retry It again opens the main page without logging in.

Can you tell me how it will be done..?
Praful Thakare
Ranch Hand

Joined: Feb 10, 2001
Posts: 642
Try this,if it helps u,
Keep the code of cache as it is and
add following lines at top of ur jsps.
and add value to userid in session at login.
and invalidate session after logoff
[ October 14, 2003: Message edited by: Praful Thakare ]

All desirable things in life are either illegal, banned, expensive or married to someone else !!!
I agree. Here's the link:
subject: Session Tracking
It's not a secret anymore!