I need a help on login authorization. When I use a direct link of one of my web page without providing credentials (without logging in) then I need to be redirected to the login page for proper login with login credentials. How can I go about this with JSP?
Asked
Active
Viewed 894 times
2
-
Universal Login Authorization , are you talking about single sign on. – Dead Programmer Mar 22 '11 at 05:59
-
@suresh: ni my requirement is when i use a direct link of a web page without login that should be redirected to login page for credentials – Pradeep Neo Mar 22 '11 at 10:22
1 Answers
2
Create a filter
Check for some session attribute . if present consider logged in user , otherwise
response.sendRedirect("url to login page");
jmj
- 237,923
- 42
- 401
- 438
-
1@joshi: thanks for responding i dont know how to do that if u dont mind can u send me the code please – Pradeep Neo Mar 22 '11 at 10:23
-
-
1Hehe, "pls send teh codez". A real one! :) I just had to vote that up. :) – Wouter van Nifterick Apr 06 '11 at 13:38