You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Rick Mann <rm...@latencyzero.com> on 2002/05/31 07:57:40 UTC
Re: Best way to forward to login, then re-forward to
originallyrequested resource?
on 5/29/02 3:36 AM, Reinhard Nägele at reinhard.naegele@mgm-edv.de wrote:
> session.setAttribute(REDIRECT_KEY, mapping);
> return mapping.findForward("login");
>
>
> In your login action, check if a mapping is in the session and go there:
>
> ActionMapping redirectMapping =
> (ActionMapping) session.getAttribute(REDIRECT_KEY);
> if (redirectMapping != null) {
> session.removeAttribute(REDIRECT_KEY);
> return new ActionForward(redirectMapping.getInput());
> }
Thank you. In retrospect, this is so incredibly obvious (storing the actual
mapping object), I'm embarrassed to have had to ask it. Thank you very much.
--
Rick
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>