struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Baetz <baetz.paderb...@arcor.de>
Subject Re: quest on dynamic redirect
Date Mon, 22 Sep 2008 23:23:50 GMT
I thought of the same problem some time ago.

- during the execution of I all information for the correct redirect is 
stored (session, bean... whatsoever)
- during the login action, after the login is confirmed the action 
realizes that a redirect is requestet (to a.action)

now the login action can get a result like this

<result name="redirect" type="......">${redirectTo}</result>

now the action is asced for the correct action name/tiles view... it 
shall return.

Greetings,
Alexander

Gianluca Musella schrieb:
> This is my requirement:
>
> - the user asks for a resource, say A.action
> - the controller fires a custom interceptor I to authenticate the user
> - user isn't authenticated, so I redirect to L, the login page
> - user enters valid credentials
> - the controller redirect to the original requested A.action
>
> The problem is that the results of the login action are statically
> cablated in struts.xml:
>
>                 <result type="tiles" name="success">home</result>
>                 <result type="tiles" name="failure">login</result>
>
> But I need a new case to redirect dynamically to A.action (I can't
> provide statically all cases in my struts.xml).
>
> How can I have this behaviour?
>
> thanks
>
> Gianluca
>
> ---------------------------------------------------------------------
> 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