Do you use Appfuse or only WebWork/Struts?

I think you are missing some nice feature.

There is no needed method parameter into your url.

You can define into you xwork.xml an action mapping and bind these with a
method from an action.

If you see this action mapping:

<action name="editRedenControle" class="redenControleAction" method="edit">
            <result
name="success">/WEB-INF/pages/intake/medisch/redenControleForm.jsp</result>
</action>

when we call http://localhost/app/editRedenControle.html it will calls the
edit method from redenControleAction (the real path of this action is
defined in action-servlet.xml).

Jasper



Fabrizio Cappelletti wrote:
> 
> I reply to myself, because I have found the answer and I think it's better
> to remark it.
> 
> In the BaseAction.java (under src/web.action) the method "execute" handle
> URLs without parameter ("method" for default): if the URL contains (and
> NOT
> only begins with) the words "edit", "save" or "view" it will call
> respectively the methods "edit", "save" or "search". Clearly if you have
> an
> URL called /view.html and you specify the "method" parameter, you'll have
> what you are expeting; this note is true only for URL without "method"
> parameter specified.
> 
>  
> 
>  
> 
> Follow up my question:
> 
>  
> 
> Hi all,
> 
> I have a newbie struts question for you: to choose an Action method to
> execute from a jsp is ALWAYS needed to specify the method=<methodname>
> parameter when calling the Action path (i.e. users.html).
> 
> I know that there is a default called by the "unspecified" method, and I
> know that adding the method parameter always works. 
> 
> But I have found in some points that calling only the path without method
> parameter works! But only in some special cases I think, because I have
> made
> many tests and searched through the code but I have found nothing that
> could
> help me.
> 
>  
> 
> Thank you
> 
> Fabrizio
> 
>  
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/struts---method-parameter-tf2869777s2369.html#a8021721
Sent from the AppFuse - User mailing list archive at Nabble.com.

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

Reply via email to