You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Airlene B <ai...@gmail.com> on 2008/04/25 10:45:12 UTC

Redirect to any URL.

Hi,

I want to redirect a user to his previous visited URL, after a successful
login.
For example, a user clicked on:
/mySite/products/purchase.action?id=45&try=234

and this takes him to the login page. I do that by using a login interceptor
on purchase.action. I store this URL in the session in the login
interceptor. Any ideas on how I redirect back to this URL? (Of course this
URL can vary depending on where the user was).

Thanks.
-- 
View this message in context: http://www.nabble.com/Redirect-to-any-URL.-tp16893207p16893207.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Redirect to any URL.

Posted by Randy Burgess <RB...@nuvox.com>.
After successful login credentials are passed into your login action you
could get the URL out of the session and redirect them back to that page.
This might work for you on the redirect.

http://struts.apache.org/2.x/docs/parameters-in-configuration-results.html

Regards,
Randy Burgess
Sr. Web Applications Developer
Nuvox Communications



> From: Airlene B <ai...@gmail.com>
> Reply-To: Struts Users Mailing List <us...@struts.apache.org>
> Date: Fri, 25 Apr 2008 01:45:12 -0700 (PDT)
> To: <us...@struts.apache.org>
> Subject: Redirect to any URL.
> 
> 
> Hi,
> 
> I want to redirect a user to his previous visited URL, after a successful
> login.
> For example, a user clicked on:
> /mySite/products/purchase.action?id=45&try=234
> 
> and this takes him to the login page. I do that by using a login interceptor
> on purchase.action. I store this URL in the session in the login
> interceptor. Any ideas on how I redirect back to this URL? (Of course this
> URL can vary depending on where the user was).
> 
> Thanks.
> -- 
> View this message in context:
> http://www.nabble.com/Redirect-to-any-URL.-tp16893207p16893207.html
> Sent from the Struts - User mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 



This email and any attachments ("Message") may contain legally privileged and/or confidential information.  If you are not the addressee, or if this Message has been addressed to you in error, you are not authorized to read, copy, or distribute it, and we ask that you please delete it (including all copies) and notify the sender by return email.  Delivery of this Message to any person other than the intended recipient(s) shall not be deemed a waiver of confidentiality and/or a privilege.


This email and any attachments ("Message") may contain legally privileged and/or confidential information.  If you are not the addressee, or if this Message has been addressed to you in error, you are not authorized to read, copy, or distribute it, and we ask that you please delete it (including all copies) and notify the sender by return email.  Delivery of this Message to any person other than the intended recipient(s) shall not be deemed a waiver of confidentiality and/or a privilege.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org