Solved

Refresh Button

Posted on 2002-07-11
5
231 Views
Last Modified: 2010-04-01
I have an application using JSP/Servlets. Once my JSP Page is loaded
completetly, if I press the Refresh Button of the browser,it refreshes
the
JSP Page along with the execution of the Servlet. I want to Redirect
the
User to login page in such cases. How do I Achieve that?

Note: I don't want to disable the button nor to hide the toolbar.
0
Comment
Question by:jmaya
  • 3
5 Comments
 
LVL 19

Expert Comment

by:cheekycj
ID: 7146479
0
 
LVL 19

Expert Comment

by:cheekycj
ID: 7146487
sorry wrong question :(

CJ
0
 
LVL 19

Accepted Solution

by:
cheekycj earned 200 total points
ID: 7146509
You have an interesting problem here and I can think of a few SIMPLE ways to go about it.

the basics here are counters.  You want to see if the page has been loaded more than once.

The first thing to do is when the page is loaded (for the first time) check for an existing counter.. if it exists increment it and if it doesn't exist set it 1.

If counter > 1 then redirect to login page.

The different approaches that I mentioned are in the ways of storing the counter.

1. cookies (page specific of course)
2. url params
3. session var (page specific of course)

Does that work for what you want?

CJ
0
 
LVL 19

Expert Comment

by:Kuldeepchaturvedi
ID: 9560830
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

"Accept cheekycj's last comment as answer."
 
Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Kuldeepchaturvedi
EE Cleanup Volunteer
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

Scam emails are a huge burden for many businesses. Spotting one is not always easy. Follow our tips to identify if an email you receive is a scam.
We have come a long way with backup and data protection — from backing up to floppies, external drives, CDs, Blu-ray, flash drives, SSD drives, and now to the cloud.
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now