wood burning stoves 2.0*
The moose likes Servlets and the fly likes Dynamic link redirect with login Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Dynamic link redirect with login" Watch "Dynamic link redirect with login" New topic
Author

Dynamic link redirect with login

nick angel
Ranch Hand

Joined: Dec 14, 2005
Posts: 39
Good day to all,

I was wondering if someone could give me some guidance to the following matter.

I wish to provide a link to a user to a section of my intranet. If the user is not logged in however
then the user will be redirected to the login page. Once he has successfully logged in the user is
redirected to the original link. (Note: the login mechanism is in a servlet).

I thought of using a session variable that would contain the original link.
If the user is not logged in then the link could be stored as a variable in the user's
session. Once the loggin is successful, the variable could be recovered and used to redirect the user to the
originally requested page. I am simply looking for guidance.

Thank you in advance.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60766
    
  65

Sounds like a plan.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
ou yang
Greenhorn

Joined: Oct 14, 2008
Posts: 10
i know what you mean.you may use filter and session to validate all users.i have some code about this.if you want i can send it to you.
Alexsandra Carvalho
Ranch Hand

Joined: Jul 13, 2007
Posts: 75
Hello ou yang
Please...can you send to me the code about this question?

Thansk a lot
Alexsandra
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Dynamic link redirect with login
 
Similar Threads
WEB-INF/web.xml-help
redirecting a logged in user to the previous page
Going to previous state in JSF
Redirect user to login page after session expires
Confused ,need some help in coding