struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Taylor" <rtay...@mulework.com>
Subject RE: Parameter
Date Wed, 13 Nov 2002 18:08:20 GMT
Sean, the DispatchAction will "look" for the 'method' parameter in the HTTP
request query string, that's
why setting the value as a request attribute is not working.
So most likely you will have to do something like the following in your
action class.

ActionForward forward = // get forward
String path = forward.getPath();
path = new
StringBuffer(path).append("?method=").append(methodValue).toString();
forward = new ActionForward(path);
return forward;

This should create an action forward with a path that contains the
appropriate method
indicator in your HTTP request query string. The DispatchAction will get
invoked, find
the 'method' parameter and execute the appropriate operation.

> -----Original Message-----
> From: Cohan, Sean [mailto:SCohan@goSPS.com]
> Sent: Wednesday, November 13, 2002 12:36 PM
> To: Struts (E-mail)
> Subject: Parameter
>
>
> I'm in one action class and I'm want to forward to another DispatchAction
> class.  The second DispatchAction class requires a 'method'
> parameter which
> is used to determine which method to call within the DispatchAction.  How
> can I set the method parameter in the first action class so it can be used
> by the DispatchAction?
>
> Right now, I trying request.setAttribute("method",
> "getChangesSinceLastCertified") just before forwarding, but I'm getting a
> "HTTP Status 400 - Request[/recertify] does not contain handler parameter
> named method".
>
> Thanks.
>
>
> --
> To unsubscribe, e-mail:
> <mailto:struts-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:struts-user-help@jakarta.apache.org>
>


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


Mime
View raw message