| Author |
Transfer the control to login page.
|
arvind kushwaha
Ranch Hand
Joined: Aug 12, 2011
Posts: 32
|
|
Dear Team,
I have a requirement whenever user wants to view any other jsp page except login page the control should be transfer to login page. How should i achieve it .
Thanks and Regards
Arvind
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56549
|
|
So no one can ever see any other page? Sounds easy; jut have one page.
Or do you mean prior to authentication? (If so, be explicit). In that case, a filter that checks for authentication is the way to go.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
arvind kushwaha
Ranch Hand
Joined: Aug 12, 2011
Posts: 32
|
|
Dear Bear Bibeault,
I need to check prior to authentication. For Example suppose i had enter the gmail inbox url without providing authentication. So in that case login page is shown to me, not the gmail inbox url .
Same way i want in my project. I have no idea how to do that...Please suggest me or provide some example.
Thanks and regards
Arvind Kushwaha
|
 |
Jigar Naik
Ranch Hand
Joined: Dec 12, 2006
Posts: 744
|
|
You can use Servlet Filters.
Please refer below link
Securing J2EE Applications with a Servlet Filter
|
Jigar Naik
|
 |
Junilu Lacar
Bartender
Joined: Feb 26, 2001
Posts: 4134
|
|
arvind kushwaha wrote:I have no idea how to do that...Please suggest me or provide some example.
Here's how you can build up your "search muscles" so that you can SearchFirst (<-- click) next time.
Step 1: Note down key words in answers
Bear Bibeault wrote:a filter that checks for authentication is the way to go.
Step 2: Note down key words in your question.
arvind kushwaha wrote:I need to check prior to authentication. For Example suppose i had enter the gmail inbox url without providing authentication. So in that case login page is shown to me, not the gmail inbox url .
... I have no idea how to do that...Please suggest me or provide some example.
Step 3: Think of words that would make your search criteria more specific.
Step 4: Go to Google and type in the words. Hit "Search" and viola! A bunch of links that you can go through to find your answer!
In this case, you would Google for: authentication filter login java
|
Junilu - [How to Ask Questions] [How to Answer Questions] [MiH]
|
 |
 |
|
|
subject: Transfer the control to login page.
|
|
|