You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by jm...@apache.org on 2003/04/25 05:07:46 UTC

cvs commit: jakarta-struts/web/example/WEB-INF struts-config-registration.xml struts-config.xml web.xml

jmitchell    2003/04/24 20:07:46

  Modified:    web/example/WEB-INF struts-config.xml web.xml
  Added:       web/example/WEB-INF struts-config-registration.xml
  Log:
  Multi-config files for the example app.
  
  Revision  Changes    Path
  1.31      +0 -22     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.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- struts-config.xml	31 Jan 2003 18:00:35 -0000	1.30
  +++ struts-config.xml	25 Apr 2003 03:07:45 -0000	1.31
  @@ -46,11 +46,6 @@
         <form-property name="password" type="java.lang.String"/>
       </form-bean>
   
  -
  -    <!-- Registration form bean -->
  -    <form-bean      name="registrationForm"
  -                    type="org.apache.struts.webapp.example.RegistrationForm"/>
  -
       <!-- Subscription form bean -->
       <form-bean      name="subscriptionForm"
                       type="org.apache.struts.webapp.example.SubscriptionForm"/>
  @@ -62,7 +57,6 @@
     <global-forwards>
       <forward   name="logoff"               path="/logoff.do"/>
       <forward   name="logon"                path="/logon.jsp"/>
  -    <forward   name="registration"         path="/registration.jsp"/>
       <forward   name="success"              path="/mainMenu.jsp"/>
     </global-forwards>
   
  @@ -70,15 +64,6 @@
     <!-- ========== Action Mapping Definitions ============================== -->
     <action-mappings>
   
  -    <!-- Edit user registration -->
  -    <action    path="/editRegistration"
  -               type="org.apache.struts.webapp.example.EditRegistrationAction"
  -          attribute="registrationForm"
  -              scope="request"
  -           validate="false">
  -      <forward name="success"              path="/registration.jsp"/>
  -    </action>
  -
       <!-- Edit mail subscription -->
       <action    path="/editSubscription"
                  type="org.apache.struts.webapp.example.EditSubscriptionAction"
  @@ -106,13 +91,6 @@
                  type="org.apache.struts.webapp.example.ExpiredPasswordException"
                  path="/changePassword.jsp"/>
       </action>
  -
  -    <!-- Save user registration -->
  -    <action    path="/saveRegistration"
  -               type="org.apache.struts.webapp.example.SaveRegistrationAction"
  -               name="registrationForm"
  -              scope="request"
  -              input="registration"/>
   
       <!-- Save mail subscription -->
       <action    path="/saveSubscription"
  
  
  
  1.18      +1 -1      jakarta-struts/web/example/WEB-INF/web.xml
  
  Index: web.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/web/example/WEB-INF/web.xml,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- web.xml	22 Apr 2003 03:25:47 -0000	1.17
  +++ web.xml	25 Apr 2003 03:07:45 -0000	1.18
  @@ -13,7 +13,7 @@
       <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
       <init-param>
         <param-name>config</param-name>
  -      <param-value>/WEB-INF/struts-config.xml</param-value>
  +      <param-value>/WEB-INF/struts-config.xml, /WEB-INF/struts-config-registration.xml</param-value>
       </init-param>
       <load-on-startup>1</load-on-startup>
     </servlet>
  
  
  
  1.1                  jakarta-struts/web/example/WEB-INF/struts-config-registration.xml
  
  Index: struts-config-registration.xml
  ===================================================================
  <?xml version="1.0" encoding="ISO-8859-1" ?>
  
  <!DOCTYPE struts-config PUBLIC
            "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
            "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
  
  <!--
       This is the Struts configuration file for the registration 
       portion of the example application, using the proposed new syntax.
  -->
  
  <struts-config>
  
    <!-- ========== Form Bean Definitions =================================== -->
    <form-beans>
  
      <!-- Registration form bean -->
      <form-bean      name="registrationForm"
                      type="org.apache.struts.webapp.example.RegistrationForm"/>
  
    </form-beans>
  
    <!-- ========== Global Forward Definitions ============================== -->
    <global-forwards>
      <forward   name="registration"         path="/registration.jsp"/>
    </global-forwards>
  
    <!-- ========== Action Mapping Definitions ============================== -->
    <action-mappings>
  
      <!-- Edit user registration -->
      <action    path="/editRegistration"
                 type="org.apache.struts.webapp.example.EditRegistrationAction"
            attribute="registrationForm"
                scope="request"
             validate="false">
        <forward name="success"              path="/registration.jsp"/>
      </action>
  
      <!-- Save user registration -->
      <action    path="/saveRegistration"
                 type="org.apache.struts.webapp.example.SaveRegistrationAction"
                 name="registrationForm"
                scope="request"
                input="registration"/>
  
    </action-mappings>
  
  </struts-config>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org