Thanks all for your answers, I solved it by calling request.getRequestURL() and
setting a request attribute with the original url. The redirect gets that
attribute and includes it in the querystring.
<global-results>
<result name="registrarAgente" type="redirect">
/agente/RegistrarAgenteAction_input.action?urlOriginal=${#request.urlOriginal}
</result>
</global-results>
I will also check the Spring Security.
Alfredo Osorio
-----Mensaje original-----
De: Roger Varley [mailto:[email protected]]
Enviado el: Thursday, March 17, 2011 4:48 PM
Para: Struts Users Mailing List
Asunto: Re: Redirect and pass as a parameter the original url from an
Interceptor
On Thu, 2011-03-17 at 12:48 -0600, Alfredo Manuel Osorio Martinez wrote:
> I am implementing a Login interceptor which needs to redirect to an
> action to first authenticate the user. The problem is that I want to
> send as a parameter to that action the original url, the one that the
> user was trying to get before the redirect to the login page.
This is not a direct answer to your question, but I would suggest that
rather than re-inventing the wheel, you take a look at integrating
Spring Security, what you're looking for is implemented "out of the box"
with a bit of configuration.
Regards
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]