<snip>
For that, I put in my request the "method" parameter
</snip>

No you didnt. You put in a "method" ATTRIBUTE. I saw you!
See:
<snip>
request.setAttribute("method", "list");
</snip>

What you want to do is something like the following:
ActionForward forward = actionMapping.findForward("do_edition");
String path = addParam(path,"method","list");
return new ActionForward(path, forward.getRedirect() );

(btw: that should be a redirecting forward (unless you have a very good
excuse for chaining actions - something that is considered a bad idea in
general))

You addParam method might look something like:

public String addParam(String url, String parameter, String value)
{
  return url + ( (url.indexOf("?")==-1) ? "?" : "&" ) + parameter + "=" +
value;
}


-----Original Message-----
From: Nicolas Delsaux [mailto:[EMAIL PROTECTED]
Sent: Friday, 12 September 2003 19:28
To: [EMAIL PROTECTED]
Subject: DispatchAction forward issue


Hi, I'm using a dispatchaction for displaying/editing objects, on which I
would like to do a forward, through an ActionForward, from an other action.
For that, I put in my request the "method" parameter, that should be
interpreted (for what I know) by Struts, in ordeer to determine the method
to call.
And, as you may guess, Struts does not see this mparameter and send me the
following error message :

message Request[/list] does not contain handler parameter named method

How can I make Struts understand what I want ?
For your information, here are the involved code fragments :

struts-config.xml

     <action  path="/list"
                type="com.ListAllFieldsAction"
           name="listAllAttributes"
           scope="request"
            validate="true"
    parameter="method"/>

<action path="/edit_tree_object"
type="com.EditTreeObjectAction"
         name="edit_tree_object"
         scope="request"
         validate="false">
         <forward name="do_edition" path="/list.do"/>
</action>

And, in my EditTreeObjectAction, the execute method contains the following
code :

request.setAttribute("method", "list");
return actionMapping.findForward("do_edition");

Thanks in advance

--
Nicolas Delsaux


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to