I'm interested in using the Restful2ActionMapper, but I'm unclear
about how to specify it's usage.
1. I'm assuming that I'll need to modify the "struts.mapper.class"
struts property. Is that right?
2. In the struts-default.xml file that ships with Struts2, there's a
line, which names the class to "restful2":
<bean type="org.apache.struts2.dispatcher.mapper.ActionMapper"
name="restful2"
class="org.apache.struts2.dispatcher.mapper.Restful2ActionMapper" />
So, assuming that I need to modify the struts.mapper.class property,
which is right:
struts.mapper.class=restful2
or
struts.mapper.class=org.apache.struts2.dispatcher.mapper.Restful2ActionM
apper
3. On a side note, I'm looking for a little clarification on the ReST
conventions in S2. The ReST conventions specify some fringe HTTP
methods (DELETE, PUT) for invoking the "remove" and "create" methods
of an action. To work around the limitations of HTML, the docs say to
use the parameter "__http_method" in order to make it work.
Practically speaking, does this mean that I need a form field to do
this?
<s:hidden name="__http_method" value="'PUT'" />
If I understand correctly, will this form field invoke the "create"
method of my action?
Thanks!
Eric Rank
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]