7/28/06, Christopher Goldman <cgoldman (AT) dhapdigital (DOT) comwrote:
Fri, 2006-07-28 at 19:58 +0200, Henning Schild wrote:
Hello,
i am currently working on my first struts application. That is why i am
looking at the example and there are a few things i do not understand.
The tour says something about an action-mapping
<action path="/EditRegistration"
indeed there is nothing like this in the struts-config.xml
To make life more interesting, the MailReader 1.2.9 uses multiple
configuration files and wildcard mappings. The mapping that matches
the URI "/EditRegistration.do" is in the
struts-config-registration.xml file.
*
Since there is not an exact or closer match, the mapping it does match is
<!-- Matches all edit actions (in this case, only user regstration)
<action path="/Edit*"
type="{1}Action"
name="{1}Form"
scope="request"
validate="false">
<forward name="success" path="/{1}.jsp"/>
</action>
which in turn resolves to the EditRegistrationAction and the
RegistrationForm. (The {1} is matched to the value of the first *).
The tour for MailReader 1.3 (and 2.0) has been updated to explain
wildcards and to demonstrate best practices.
*
-- HTH, Ted.
* http://www.husted.com/struts/
To unsubscribe, e-mail: user-unsubscribe (AT) struts (DOT) apache.org
For additional commands, e-mail: user-help (AT) struts (DOT) apache.org