Solved

Refresh Button

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Mockito Method call failing. 3 190
Stuck in Bootstrap WysiHtml Editor 3 37
JSP Popup page 2 108
spring dependency injection using java config 2 81
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
With the rapid rise in mobile usage, mobile devices are here to stay and have become an integral part of doing business. Here are 9 great apps for your BYOD environment.
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

863 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

22 Experts available now in Live!

Get 1:1 Help Now