struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antonio Sánchez <juntandolin...@gmail.com>
Subject Re: S2 custom authentication: remembering original request
Date Wed, 10 Jul 2013 13:29:51 GMT
> Second question: because it's a redirect, hence a new request.

http://localhost:8084/mycontext/autenticar => login.jsp - OK

Returned by interceptor:

        <global-results>
            <result name="AUTENTICAR">/autenticar</result>
        </global-results>

http://localhost:8084/mycontext/admin/protected => 404 ERROR - /mycontext/autenticar not
available

How should I "forward" to actions? 



El Miércoles, 10 de julio de 2013 07:43:38 Dave Newton escribió:
> Second question: because it's a redirect, hence a new request.
> 
> Dave
>  On Jul 10, 2013 7:28 AM, "Antonio Sánchez" <juntandolineas@gmail.com>
> 
> wrote:
> > Use Case: request some protected resource -> redirect action for
> > authentication -> access protected resource.
> > 
> > I'm using a custom interceptor that redirects (redirectAction) to a global
> > result if no user object is found in session. The final action result then
> > redirects to a login page.
> > 
> > The interceptor gets the original action requested (using
> > request.getServletPath(), but not sure if this is right), and puts it in
> > the value stack. It would be used with dynamic redirection in the final
> > result upon login success( ${nextAction} ) . This action must be passed in
> > between redirections.
> > 
> > But I need to reuse the original request. Reconstructing the request with
> > a query string is not an option. I need the original request: GET/POST
> > method, all parameters/values, maybe uploading binary content
> > (inputstream), maybe headers...
> > 
> > Is it possible to do this? How?
> > 
> > ------
> > 
> > Partially related to this: I'm having problems with redirections. The
> > original request parameters are forwarded only using dispatcher result .
> > If
> > I use redirectAction or redirect, original params are lost. Why?
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org

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


Mime
View raw message