Anton,

Acegi Security does something similar. The original requests (yes -- the
actual request object) is stored in the session when the user's credentials
are challenged. If they then succeed at the login page, the original request
is taken from the session and forwarded along.

Paul

On 9/30/07, Anton Pussep <[EMAIL PROTECTED]> wrote:
>
> I spent quite a few hours today trying to forward the user to his
> original destination when he has to login in between.
>
> I have an interceptor (Authentication) that is called before an action
> and it forwards to Login.action if the user is not logged in. The
> problem is that if Login.action returns SUCCESS the struts.xml maps it
> to a static page (index.jsp) and not the page originally requested by
> the user.
>
> My current solution is it that the Authentication interceptor saves the
> requested URL as a session attribute and Login.action reads it and makes
> a getResponse().sendForward(requestedURL). However, I am not happy with
> this solution and I guess there are some much better solutions out
> there. Would be great if you could suggest me a better way to do that.
>
> Best regards,
> Anton
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to