husted 2003/12/21 14:43:52 Modified: web/example/WEB-INF struts-config.xml struts-config-registration.xml Log: Use "name" rather than "attribute" in configuration, per documented and common practice. Revision Changes Path 1.34 +61 -70 jakarta-struts/web/example/WEB-INF/struts-config.xml Index: struts-config.xml =================================================================== RCS file: /home/cvs/jakarta-struts/web/example/WEB-INF/struts-config.xml,v retrieving revision 1.33 retrieving revision 1.34 diff -u -r1.33 -r1.34 --- struts-config.xml 10 Aug 2003 02:52:55 -0000 1.33 +++ struts-config.xml 21 Dec 2003 22:43:52 -0000 1.34 @@ -15,30 +15,6 @@ ]]> </description> - - <!-- ========== Data Source Configuration =============================== --> -<!-- - <data-sources> - <data-source> - <set-property property="autoCommit" - value="false"/> - <set-property property="description" - value="Example Data Source Configuration"/> - <set-property property="driverClass" - value="org.postgresql.Driver"/> - <set-property property="maxCount" - value="4"/> - <set-property property="minCount" - value="2"/> - <set-property property="password" - value="mypassword"/> - <set-property property="url" - value="jdbc:postgresql://localhost/mydatabase"/> - <set-property property="user" - value="myusername"/> - </data-source> - </data-sources> ---> <!-- ========== Form Bean Definitions =================================== --> <form-beans> @@ -59,60 +35,75 @@ <!-- ========== Global Forward Definitions ============================== --> <global-forwards> <forward name="logoff" path="/logoff.do"/> - <forward name="logon" path="/logon.jsp"/> - <forward name="success" path="/mainMenu.jsp"/> + <forward name="logon" path="/logon.do"/> + <forward name="success" path="/mainMenu.do"/> + <forward name="welcome" path="/welcome.do"/> </global-forwards> <!-- ========== Action Mapping Definitions ============================== --> <action-mappings> - <!-- Edit mail subscription --> - <action path="/editSubscription" - type="org.apache.struts.webapp.example.EditSubscriptionAction" - attribute="subscriptionForm" - scope="request" - validate="false"> - <forward name="failure" path="/mainMenu.jsp"/> - <forward name="success" path="/subscription.jsp"/> - </action> - - <!-- Process a user logoff --> - <action path="/logoff" - type="org.apache.struts.webapp.example.LogoffAction"> - <forward name="success" path="/index.jsp"/> - </action> - - <!-- Process a user logon --> - <action path="/logon" - type="org.apache.struts.webapp.example.LogonAction" - name="logonForm" - scope="session" - input="logon"> - <exception - key="expired.password" - type="org.apache.struts.webapp.example.ExpiredPasswordException" - path="/changePassword.jsp"/> - </action> - - <!-- Save mail subscription --> - <action path="/saveSubscription" - type="org.apache.struts.webapp.example.SaveSubscriptionAction" - name="subscriptionForm" - scope="request" - input="subscription"> - <forward name="subscription" path="/subscription.jsp"/> - <forward name="success" path="/editRegistration.do?action=Edit"/> - </action> - - - <!-- Display the "walking tour" documentation --> - <action path="/tour" - forward="/tour.htm"> - </action> + <!-- Display welcome page --> + <action path="/welcome" + forward="/welcome.jsp"/> + + <!-- Display registration page --> + <action path="/registration" + forward="/registration.jsp"/> + + <!-- Display logon page --> + <action path="/mainMenu" + forward="/mainMenu.jsp"/> + + <!-- Display logon page --> + <action path="/logon" + forward="/logon.jsp"/> + + <!-- Process a user logon --> + <action path="/submitLogon" + type="org.apache.struts.webapp.example.LogonAction" + name="logonForm" + scope="session" + input="logon"> + <exception + key="expired.password" + type="org.apache.struts.webapp.example.ExpiredPasswordException" + path="/changePassword.jsp"/> + </action> + + <!-- Process a user logoff --> + <action path="/logoff" + type="org.apache.struts.webapp.example.LogoffAction"> + <forward name="success" path="/welcome.do"/> + </action> + + <!-- Edit mail subscription --> + <action path="/editSubscription" + type="org.apache.struts.webapp.example.EditSubscriptionAction" + name="subscriptionForm" + scope="request" + validate="false"> + <forward name="failure" path="/mainMenu.do"/> + <forward name="success" path="/subscription.jsp"/> + </action> + + <!-- Save mail subscription --> + <action path="/saveSubscription" + type="org.apache.struts.webapp.example.SaveSubscriptionAction" + name="subscriptionForm" + scope="request" + input="subscription"> + <forward name="subscription" path="/subscription.jsp"/> + <forward name="success" path="/editRegistration.do?action=Edit"/> + </action> + + <!-- Display the "walking tour" documentation --> + <action path="/tour" + forward="/tour.htm"> + </action> </action-mappings> - <!-- ========== Controller Configuration ================================ --> 1.5 +3 -3 jakarta-struts/web/example/WEB-INF/struts-config-registration.xml Index: struts-config-registration.xml =================================================================== RCS file: /home/cvs/jakarta-struts/web/example/WEB-INF/struts-config-registration.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- struts-config-registration.xml 25 Oct 2003 01:37:12 -0000 1.4 +++ struts-config-registration.xml 21 Dec 2003 22:43:52 -0000 1.5 @@ -11,7 +11,7 @@ </display-name> <description><![CDATA[ This is the Struts configuration file for the registration - portion of the example application, using the proposed new syntax. + portion of the example application, using the wildcard syntax. ]]> </description> @@ -26,7 +26,7 @@ <!-- ========== Global Forward Definitions ============================== --> <global-forwards> - <forward name="Registration" path="/Registration.jsp"/> + <forward name="Registration" path="/registration.jsp"/> </global-forwards> <!-- ========== Action Mapping Definitions ============================== --> @@ -35,7 +35,7 @@ <!-- Matches all edit actions (in this case, only user regstration) --> <action path="/edit*" type="org.apache.struts.webapp.example.Edit{1}Action" - attribute="{1}Form" + name="{1}Form" scope="request" validate="false"> <forward name="success" path="/{1}.jsp"/>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]