martinc     02/02/26 22:20:59

  Modified:    src/share/org/apache/struts/config ConfigRuleSet.java
               web/example/WEB-INF struts-config.xml web.xml
  Log:
  Fix the new mechanism for loading message resources based on specification
  in the struts-config.xml file instead of the web.xml file.
  
  Update the struts-example application to use this mew mechanism.
  
  PR: 6646
  Submitted by: Chuck Cavaness
  
  Revision  Changes    Path
  1.8       +6 -6      
jakarta-struts/src/share/org/apache/struts/config/ConfigRuleSet.java
  
  Index: ConfigRuleSet.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/config/ConfigRuleSet.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ConfigRuleSet.java        23 Feb 2002 22:54:18 -0000      1.7
  +++ ConfigRuleSet.java        27 Feb 2002 06:20:59 -0000      1.8
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/config/ConfigRuleSet.java,v 1.7 
2002/02/23 22:54:18 craigmcc Exp $
  - * $Revision: 1.7 $
  - * $Date: 2002/02/23 22:54:18 $
  + * $Header: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/config/ConfigRuleSet.java,v 1.8 
2002/02/27 06:20:59 martinc Exp $
  + * $Revision: 1.8 $
  + * $Date: 2002/02/27 06:20:59 $
    *
    * ====================================================================
    *
  @@ -74,7 +74,7 @@
    * configuration file (<code>struts-config.xml</code>).</p>
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.7 $ $Date: 2002/02/23 22:54:18 $
  + * @version $Revision: 1.8 $ $Date: 2002/02/27 06:20:59 $
    * @since Struts 1.1
    */
   
  @@ -243,8 +243,8 @@
           digester.addSetProperties
               ("struts-config/message-resources");
           digester.addSetNext
  -            ("struts-config/messageResources",
  -             "setMessageResourcesConfig",
  +            ("struts-config/message-resources",
  +             "addMessageResourcesConfig",
                "org.apache.struts.config.MessageResourcesConfig");
   
           digester.addSetProperty
  
  
  
  1.17      +8 -2      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.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- struts-config.xml 23 Feb 2002 22:54:18 -0000      1.16
  +++ struts-config.xml 27 Feb 2002 06:20:59 -0000      1.17
  @@ -159,11 +159,17 @@
     </action-mappings>
   
   
  +  <!-- ========== Message Resources Definitions =========================== -->
  +
  +  <message-resources
  +    parameter="org.apache.struts.webapp.example.ApplicationResources"/>
  +
  +
     <!-- ========== Plug Ins Configuration ================================== -->
   
     <plug-in className="org.apache.struts.webapp.example.DatabasePlugIn">
  -      <set-property property="debug"    value="9"/>
  -      <set-property property="pathname" value="/WEB-INF/database.xml"/>
  +    <set-property property="debug"    value="9"/>
  +    <set-property property="pathname" value="/WEB-INF/database.xml"/>
     </plug-in>
   
   
  
  
  
  1.15      +0 -4      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.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- web.xml   23 Feb 2002 22:54:18 -0000      1.14
  +++ web.xml   27 Feb 2002 06:20:59 -0000      1.15
  @@ -12,10 +12,6 @@
       <servlet-name>action</servlet-name>
       <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
       <init-param>
  -      <param-name>application</param-name>
  -      
<param-value>org.apache.struts.webapp.example.ApplicationResources</param-value>
  -    </init-param>
  -    <init-param>
         <param-name>config</param-name>
         <param-value>/WEB-INF/struts-config.xml</param-value>
       </init-param>
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to