Solved

Refresh Button

Posted on 2002-07-11
5
233 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Employees depend heavily on their PCs, and new threats like ransomware make it even more critical to protect their important data.
Having trouble getting your hands on Dynamics 365 Field Service or Project Service trial? Worry No More!!!
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

786 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