| Author |
Redirecting address
|
yuvaraja jaganathan
Greenhorn
Joined: Mar 19, 2007
Posts: 7
|
|
Hi, How we are redirecting to the URL address for any of the screen in the application when the application is not in session.And how are we directing to the login page when an application is not in session.
|
 |
Ben Souther
Sheriff
Joined: Dec 11, 2004
Posts: 13410
|
|
|
Can you explain what you mean by "not in session"?
|
Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
|
 |
yuvaraja jaganathan
Greenhorn
Joined: Mar 19, 2007
Posts: 7
|
|
Let me explain clearly: How to implement a single sign on?. For instance, your organization may have a single portal for logging in users, whose login page resides at http://mycompany.com/SSOLogin. If user is not logged in and tries to access application's page, they must be redirected to the login page. Assuming successful authentication, they should be redirected to the original resource they requested.How this process works?
|
 |
nelson christos
Ranch Hand
Joined: Aug 08, 2006
Posts: 57
|
|
well if the user is not logged in, whenever he tries to make an access to the page in the application you can always take him to the login page by checking whether the user is in the session attribute. as soon as ta user logs in and is validated, you store the userObject in session. whenever he logs out or tries to make a access without logging in you take hime to the login page.
|
i think therefore i am
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56191
|
|
|
A servlet filter is perfect for this task.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
yuvaraja jaganathan
Greenhorn
Joined: Mar 19, 2007
Posts: 7
|
|
|
can you give me some code input,which will be usefull for me.
|
 |
Ben Souther
Sheriff
Joined: Dec 11, 2004
Posts: 13410
|
|
Originally posted by yuvaraja jaganathan: can you give me some code input,which will be usefull for me.
I've just added a war file to my simple.souther site. http://simple.souther.us/SimpleLogin.war If you have a servlet spec 2.4 compliant container, just download the war file to your webapps directory and give it a shot.
|
 |
yuvaraja jaganathan
Greenhorn
Joined: Mar 19, 2007
Posts: 7
|
|
Hi, Can you update me with the servlet as well that would be helpful
|
 |
Ben Souther
Sheriff
Joined: Dec 11, 2004
Posts: 13410
|
|
Originally posted by yuvaraja jaganathan: Hi, Can you update me with the servlet as well that would be helpful
It's in there.
|
 |
 |
|
|
subject: Redirecting address
|
|
|