On Wednesday 21 January 2009 20:35:49 Andreas Mähler wrote:
> Hello everybody,
>
> I would like to know if there is a sane way to store a request (i.e.
> action name and all parameters) and use it later.
>
> It would be nice to do this to redirect a user to the login screen and
> just invoke the original action after the user has been successfully
> authenticated.
>
> As this is a common task, there must be a design pattern.
>
> Thank you in advance!
>
> ~Andreas
>

I've looked into this a few times and found it not to be for the faint of 
heart. In each case I've ended up deciding to move to an external solution 
like container managed security or ACEGI / Spring Security. 

Usually, it's not so much the URL/request you have to worry about, but you 
also have to consider that the session might have timed out and the user may 
be trying to invoke an AJAX request, or POSTing a form... That's usually where 
it gets me. I'd suggest you take a look at Spring Security. It works pretty 
sweet out of the box, the current generation is a snap to configure.

-Wes


-- 

Wes Wannemacher
Author - Struts 2 In Practice 
Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more
http://www.manning.com/wannemacher


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

Reply via email to