struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ian Hunter" <ihun...@hunterweb.net>
Subject Re: ForwardAction with redirect
Date Wed, 19 Mar 2003 18:00:53 GMT
I had to subclass ForwardAction and force it to redirect.  Here's the code,
for anyone who needs it or cares:

public class RedirectAction extends ForwardAction {

    public ActionForward execute(ActionMapping mapping,
     ActionForm form,
     HttpServletRequest request,
     HttpServletResponse response)
 throws Exception {
            ActionForward retVal = super.execute (mapping, form, request,
response);
            retVal.setRedirect (true); // there's the key part
            return retVal;
    }


}



----- Original Message -----
From: "Ian Hunter" <ihunter@hunterweb.net>
To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
Sent: Wednesday, March 19, 2003 10:11 AM
Subject: ForwardAction with redirect


> I saw a Bugzilla post from someone who needed to use ForwardAction but get
a
> redirect rather than a forward, and suggested implementing a
> RedirectAction -- did that ever get done?  How are folks handling this
> scenario?
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>


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


Mime
View raw message