cedric      2002/07/26 06:33:08

  Modified:    web/blank/WEB-INF web.xml tiles-defs.xml struts-config.xml
  Log:
  Update Tiles initialization.
  
  Revision  Changes    Path
  1.5       +68 -68    jakarta-struts/web/blank/WEB-INF/web.xml
  
  Index: web.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/web/blank/WEB-INF/web.xml,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- web.xml   10 Jul 2002 20:21:25 -0000      1.4
  +++ web.xml   26 Jul 2002 13:33:08 -0000      1.5
  @@ -1,68 +1,68 @@
  -<?xml version="1.0" encoding="ISO-8859-1"?>
  -
  -<!DOCTYPE web-app
  -  PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
  -  "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd";>
  -
  -<web-app>
  -
  -  <!-- Standard Action Servlet Configuration (with debugging) -->
  -  <servlet>
  -    <servlet-name>action</servlet-name>
  -    <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>
  -    </init-param>
  -    <init-param>
  -      <param-name>debug</param-name>
  -      <param-value>2</param-value>
  -    </init-param>
  -    <init-param>
  -      <param-name>detail</param-name>
  -      <param-value>2</param-value>
  -    </init-param>
  -    <load-on-startup>2</load-on-startup>
  -  </servlet>
  -
  -
  -  <!-- Standard Action Servlet Mapping -->
  -  <servlet-mapping>
  -    <servlet-name>action</servlet-name>
  -    <url-pattern>*.do</url-pattern>
  -  </servlet-mapping>
  -
  -
  -  <!-- The Usual Welcome File List -->
  -  <welcome-file-list>
  -    <welcome-file>index.jsp</welcome-file>
  -  </welcome-file-list>
  -
  -
  -  <!-- Struts Tag Library Descriptors -->
  -  <taglib>
  -    <taglib-uri>/tags/struts-bean</taglib-uri>
  -    <taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
  -  </taglib>
  -
  -  <taglib>
  -    <taglib-uri>/tags/struts-html</taglib-uri>
  -    <taglib-location>/WEB-INF/struts-html.tld</taglib-location>
  -  </taglib>
  -
  -  <taglib>
  -    <taglib-uri>/tags/struts-logic</taglib-uri>
  -    <taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
  -  </taglib>
  -
  -  <taglib>
  -    <taglib-uri>/tags/struts-nested</taglib-uri>
  -    <taglib-location>/WEB-INF/struts-nested.tld</taglib-location>
  -  </taglib>
  -
  -  <taglib>
  -    <taglib-uri>/tags/struts-tiles</taglib-uri>
  -    <taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
  -  </taglib>
  -
  -</web-app>
  +<?xml version="1.0" encoding="ISO-8859-1"?>
  +
  +<!DOCTYPE web-app
  +  PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
  +  "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd";>
  +
  +<web-app>
  +
  +  <!-- Standard Action Servlet Configuration (with debugging) -->
  +  <servlet>
  +    <servlet-name>action</servlet-name>
  +    <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>
  +    </init-param>
  +    <init-param>
  +      <param-name>debug</param-name>
  +      <param-value>2</param-value>
  +    </init-param>
  +    <init-param>
  +      <param-name>detail</param-name>
  +      <param-value>2</param-value>
  +    </init-param>
  +    <load-on-startup>2</load-on-startup>
  +  </servlet>
  +
  +
  +  <!-- Standard Action Servlet Mapping -->
  +  <servlet-mapping>
  +    <servlet-name>action</servlet-name>
  +    <url-pattern>*.do</url-pattern>
  +  </servlet-mapping>
  +
  +
  +  <!-- The Usual Welcome File List -->
  +  <welcome-file-list>
  +    <welcome-file>index.jsp</welcome-file>
  +  </welcome-file-list>
  +
  +
  +  <!-- Struts Tag Library Descriptors -->
  +  <taglib>
  +    <taglib-uri>/tags/struts-bean</taglib-uri>
  +    <taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
  +  </taglib>
  +
  +  <taglib>
  +    <taglib-uri>/tags/struts-html</taglib-uri>
  +    <taglib-location>/WEB-INF/struts-html.tld</taglib-location>
  +  </taglib>
  +
  +  <taglib>
  +    <taglib-uri>/tags/struts-logic</taglib-uri>
  +    <taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
  +  </taglib>
  +
  +  <taglib>
  +    <taglib-uri>/tags/struts-nested</taglib-uri>
  +    <taglib-location>/WEB-INF/struts-nested.tld</taglib-location>
  +  </taglib>
  +
  +  <taglib>
  +    <taglib-uri>/tags/struts-tiles</taglib-uri>
  +    <taglib-location>/WEB-INF/struts-tiles.tld</taglib-location>
  +  </taglib>
  +
  +</web-app>
  
  
  
  1.2       +8 -1      jakarta-struts/web/blank/WEB-INF/tiles-defs.xml
  
  Index: tiles-defs.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/web/blank/WEB-INF/tiles-defs.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- tiles-defs.xml    10 Jul 2002 20:21:25 -0000      1.1
  +++ tiles-defs.xml    26 Jul 2002 13:33:08 -0000      1.2
  @@ -19,14 +19,21 @@
           <put name="footer" value="/common/footer.jsp" />
           <put name="body"   value=".portal.body" />
       </definition>
  +     
       <definition name=".mainMenu" path="/common/layouts/vboxLayout.jsp" >
  -        <putList name="componentsList" >
  +        <putList name="list" >
               <add value=".menu.links" />
               <add value=".menu.taglib.references" />
               <add value=".menu.printer.friendly" />
               <add value=".menu.old.documents" />
         </putList>
       </definition>
  +     
  +    <definition name="aPage" extends=".mainLayout">
  +        <put name="title"  value="Another Title" />
  +        <put name="body"   value=".aPage.body" />
  +    </definition>
  +     
       end samples -->
   
   </tiles-definitions>
  
  
  
  1.6       +347 -154  jakarta-struts/web/blank/WEB-INF/struts-config.xml
  
  Index: struts-config.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/web/blank/WEB-INF/struts-config.xml,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- struts-config.xml 10 Jul 2002 20:21:25 -0000      1.5
  +++ struts-config.xml 26 Jul 2002 13:33:08 -0000      1.6
  @@ -1,154 +1,347 @@
  -<?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 a blank Struts configuration file with an example
  -     welcome action/page and other commented sample elements.
  -
  -     Tiles and the Struts Validator are configured using the factory defaults
  -     and are ready-to-use.
  -
  -     NOTE: If you have a generator tool to create the corresponding Java classes
  -     for you, you could include the details in the "form-bean" declarations.
  -     Otherwise, you would only define the "form-bean" element itself, with the
  -     corresponding "name" and "type" attributes, as shown here.
  --->
  -
  -
  -<struts-config>
  -
  -<!-- ==================================== 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>
  -
  -    <!-- sample form bean descriptor for an ActionForm
  -        <form-bean
  -            name="inputForm"
  -            type="app.InputForm"/>
  -    end sample -->
  -
  -    <!-- sample form bean descriptor for a DynaActionForm
  -        <form-bean
  -            name="logonForm"
  -            type="org.apache.struts.action.DynaActionForm">
  -            <form-property
  -                name="username"
  -                type="java.lang.String"/>
  -            <form-property
  -                name="password"
  -                type="java.lang.String"/>
  -    end sample -->
  -
  -    </form-beans>
  -
  -
  -<!-- ================================= Global Exception Definitions -->
  -
  -    <global-exceptions>
  -        <!-- sample exception handler
  -        <exception
  -            key="expired.password"
  -            type="app.ExpiredPasswordException"
  -            path="/changePassword.jsp"/>
  -        end sample -->
  -    </global-exceptions>
  -
  -
  -<!-- =================================== Global Forward Definitions -->
  -
  -    <global-forwards>
  -        <!-- Default forward to "Welcome" action -->
  -        <!-- Demonstrates using index.jsp to forward -->
  -        <forward
  -            name="welcome"
  -            path="/Welcome.do"/>
  -    </global-forwards>
  -
  -
  -<!-- =================================== Action Mapping Definitions -->
  -
  -    <action-mappings>
  -
  -            <!-- Default "Welcome" action -->
  -            <!-- Forwards to Welcome.jsp -->
  -        <action
  -            path="/Welcome"
  -            type="org.apache.struts.actions.ForwardAction"
  -            parameter="/pages/Welcome.jsp"/>
  -
  -    <!-- sample input and input submit actions
  -
  -        <action
  -            path="/Input"
  -            type="org.apache.struts.actions.ForwardAction"
  -            parameter="/pages/Input.jsp"/>
  -
  -        <action
  -            path="/InputSubmit"
  -            type="app.InputAction"
  -            name="inputForm"
  -            scope="request"
  -            validate="true"
  -            input="/pages/Input.jsp"/>
  -
  -    end samples -->
  -
  -
  -    </action-mappings>
  -
  -
  -<!-- ===================================== Controller Configuration -->
  -
  -    <controller
  -       processorClass="org.apache.struts.tiles.TilesRequestProcessor"/>
  -
  -
  -<!-- ================================ Message Resources Definitions -->
  -
  -    <message-resources parameter="resources.application"/>
  -
  -
  -<!-- ======================================= Plug Ins Configuration -->
  -
  -  <plug-in className="org.apache.struts.validator.ValidatorPlugIn">
  -    <set-property
  -        property="pathnames"
  -        value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml"/>
  -  </plug-in>
  -
  -</struts-config>
  +<?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 a blank Struts configuration file with an example
  +
  +     welcome action/page and other commented sample elements.
  +
  +
  +
  +     Tiles and the Struts Validator are configured using the factory defaults
  +
  +     and are ready-to-use.
  +
  +
  +
  +     NOTE: If you have a generator tool to create the corresponding Java classes
  +
  +     for you, you could include the details in the "form-bean" declarations.
  +
  +     Otherwise, you would only define the "form-bean" element itself, with the
  +
  +     corresponding "name" and "type" attributes, as shown here.
  +
  +-->
  +
  +
  +
  +
  +
  +<struts-config>
  +
  +
  +
  +<!-- ==================================== 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>
  +
  +
  +
  +    <!-- sample form bean descriptor for an ActionForm
  +
  +        <form-bean
  +
  +            name="inputForm"
  +
  +            type="app.InputForm"/>
  +
  +    end sample -->
  +
  +
  +
  +    <!-- sample form bean descriptor for a DynaActionForm
  +
  +        <form-bean
  +
  +            name="logonForm"
  +
  +            type="org.apache.struts.action.DynaActionForm">
  +
  +            <form-property
  +
  +                name="username"
  +
  +                type="java.lang.String"/>
  +
  +            <form-property
  +
  +                name="password"
  +
  +                type="java.lang.String"/>
  +
  +    end sample -->
  +
  +
  +
  +    </form-beans>
  +
  +
  +
  +
  +
  +<!-- ================================= Global Exception Definitions -->
  +
  +
  +
  +    <global-exceptions>
  +
  +        <!-- sample exception handler
  +
  +        <exception
  +
  +            key="expired.password"
  +
  +            type="app.ExpiredPasswordException"
  +
  +            path="/changePassword.jsp"/>
  +
  +        end sample -->
  +
  +    </global-exceptions>
  +
  +
  +
  +
  +
  +<!-- =================================== Global Forward Definitions -->
  +
  +
  +
  +    <global-forwards>
  +
  +        <!-- Default forward to "Welcome" action -->
  +
  +        <!-- Demonstrates using index.jsp to forward -->
  +
  +        <forward
  +
  +            name="welcome"
  +
  +            path="/Welcome.do"/>
  +
  +    </global-forwards>
  +
  +
  +
  +
  +
  +<!-- =================================== Action Mapping Definitions -->
  +
  +
  +
  +    <action-mappings>
  +
  +
  +
  +            <!-- Default "Welcome" action -->
  +
  +            <!-- Forwards to Welcome.jsp -->
  +
  +        <action
  +
  +            path="/Welcome"
  +
  +            type="org.apache.struts.actions.ForwardAction"
  +
  +            parameter="/pages/Welcome.jsp"/>
  +
  +
  +
  +    <!-- sample input and input submit actions
  +
  +
  +
  +        <action
  +
  +            path="/Input"
  +
  +            type="org.apache.struts.actions.ForwardAction"
  +
  +            parameter="/pages/Input.jsp"/>
  +
  +
  +
  +        <action
  +
  +            path="/InputSubmit"
  +
  +            type="app.InputAction"
  +
  +            name="inputForm"
  +
  +            scope="request"
  +
  +            validate="true"
  +
  +            input="/pages/Input.jsp"/>
  +
  +
  +
  +    end samples -->
  +
  +
  +
  +
  +
  +    </action-mappings>
  +
  +
  +
  +
  +
  +<!-- ===================================== Controller Configuration -->
  +
  +
  +
  +    <controller
  +
  +       processorClass="org.apache.struts.tiles.TilesRequestProcessor"/>
  +
  +
  +
  +
  +
  +<!-- ================================ Message Resources Definitions -->
  +
  +
  +
  +    <message-resources parameter="resources.application"/>
  +
  +
  +
  +
  +
  +<!-- ======================================= Plug Ins Configuration -->
  +
  +
  +  <!-- ========== Tiles plugin ===================  -->
  +  <!--                                                                              
                 -->
  +  <!--
  +     This plugin initialize Tiles definition factory. This later can takes some
  +      parameters explained here after. The plugin first read parameters from 
web.xml, then
  +      overload them with parameters defined here. All parameters are optional.
  +      The plugin should be declared in each struts-config file.
  +       - definitions-config: (optional) 
  +            Specify configuration file names. There can be several comma 
  +                 separated file names (default: ?? )
  +        - definitions-debug: (optional)
  +             Specify Tiles debug level.
  +                       O : no debug information
  +                       1 : debug information
  +                       2 : more debug information
  +        - definitions-parser-details: (optional)
  +             Specify Digester debug level. This value is passed to Digester
  +                       O : no debug information (default)
  +                       1 : debug information
  +                       2 : more debug information
  +        - definitions-parser-validate: (optional)
  +             Specify if xml parser should validate the Tiles configuration file.
  +                       true : validate. DTD should be specified in file header. 
(default)
  +                       false : no validation
  +                       
  +       The TilesPlugin class create one single definition factory shared by all 
struts
  +       modules, even if the plugin is declared several times. Paths found in Tiles
  +       definitions are relative to the main context.
  +  -->
  +  <!-- comment following if struts1.0.x -->
  +  <plug-in className="org.apache.struts.tiles.TilesPlugin" >
  +    <set-property property="definitions-config" 
  +                      value="/WEB-INF/tiles-defs.xml" />
  +    <set-property property="definitions-debug" value="0" />
  +    <set-property property="definitions-parser-details" value="0" />
  +    <set-property property="definitions-parser-validate" value="true" />
  +  </plug-in>
  +
  +  <!-- end comment if struts1.0.x -->
  +
  +  <plug-in className="org.apache.struts.validator.ValidatorPlugIn">
  +
  +    <set-property
  +
  +        property="pathnames"
  +
  +        value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml"/>
  +
  +  </plug-in>
  +
  +
  +
  +</struts-config>
  +
  
  
  

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

Reply via email to