?
Solved

Refresh Button

Posted on 2002-07-11
5
Medium Priority
?
237 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 800 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

This article will show how Aten was able to supply easy management and control for Artear's video walls and wide range display configurations of their newsroom.
Active Directory can easily get cluttered with unused service, user and computer accounts. In this article, I will show you the way I like to implement ADCleanup..
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses

801 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