On 7/28/06, Christopher Goldman <[EMAIL PROTECTED]> wrote:
On 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. * http://svn.apache.org/viewvc/struts/struts1/branches/STRUTS_1_2_BRANCH/web/example/WEB-INF/struts-config-registration.xml 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="org.apache.struts.webapp.example.Edit{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. * http://www.planetstruts.org/struts-mailreader/Tour.do -- HTH, Ted. * http://www.husted.com/struts/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]