Solved

Refresh Button

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
jersey maven project error 7 145
sortaSum challenge java 17 174
TreeSet comparator example 7 104
org.apache.jasper.JasperException: using jstl in jsp embedded jetty 13 709
Original post  on Monitis Blog. Web performance monitoring is broken into two camps: passive and active. Passive monitoring is defined as looking at real-world historical performance by monitoring actual log-ins, site hits, clicks, requests for…
This article was initially published on Monitis Blog, you can read it here . When it comes to deciding which approach to website performance monitoring is best for your business, unfortunately, like so many options in life . . . it depends. In t…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

726 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