Author: wsmoak Date: Mon Dec 19 19:21:53 2005 New Revision: 357890 URL: http://svn.apache.org/viewcvs?rev=357890&view=rev Log: Added notes on configuring the ComposableRequestProcessor for Tiles. (Needs review.)
Modified: struts/tiles/trunk/xdocs/installation.xml struts/tiles/trunk/xdocs/userGuide.xml Modified: struts/tiles/trunk/xdocs/installation.xml URL: http://svn.apache.org/viewcvs/struts/tiles/trunk/xdocs/installation.xml?rev=357890&r1=357889&r2=357890&view=diff ============================================================================== --- struts/tiles/trunk/xdocs/installation.xml (original) +++ struts/tiles/trunk/xdocs/installation.xml Mon Dec 19 19:21:53 2005 @@ -18,7 +18,7 @@ --> <document> <properties> - <title>Installation (1.1)</title> + <title>Installation</title> </properties> <body> @@ -105,7 +105,25 @@ <li><strong>Using Tiles With Struts</strong> - Modify the <code>WEB-INF/web.xml</code> file for your web application to use a <code><servlet> - </code> that responds to Struts actions. You will need to + </code> that responds to Struts actions. Usually, this + will be the standard Struts ActionServlet:</li> + <source><![CDATA[ + <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>chainConfig</param-name> + <param-value>org/apache/struts/tiles/chain-config.xml</param-value> + </init-param> + <load-on-startup>2</load-on-startup> + </servlet> + ]]></source> + <li><strong>Using Tiles With Struts</strong> - + You will also need to configure the Tiles Plugin and the Tiles Request Processor to allow Struts to respond to Tiles-based Action Forwards. Below is a sample Tiles Plugin configuration. @@ -165,12 +183,12 @@ </ul> <p>Note to Struts 1.0 users :</p> <ul> - <li>You should use a <code>tiles.jar</code> build with Struts1.0.x.</li> - <li>If you have downloaded a Tiles version build with Struts1.0.x, you + <li>You should use a <code>tiles.jar</code> built with Struts 1.0.x.</li> + <li>If you have downloaded a Tiles version build with Struts 1.0.x, you already have it. </li> </ul> - <p>Note to Struts1.1 users :</p> + <p>Note to Struts 1.1 and 1.2 users :</p> <ul> <li>You should also initialize a <code>TilesRequestProcessor</code>.</li> <li>To do so, add following lines in your <code>struts-config.xml</code> Modified: struts/tiles/trunk/xdocs/userGuide.xml URL: http://svn.apache.org/viewcvs/struts/tiles/trunk/xdocs/userGuide.xml?rev=357890&r1=357889&r2=357890&view=diff ============================================================================== --- struts/tiles/trunk/xdocs/userGuide.xml (original) +++ struts/tiles/trunk/xdocs/userGuide.xml Mon Dec 19 19:21:53 2005 @@ -46,8 +46,24 @@ ]]></source> <p>If you are using Struts 1.2.x you will need to also make sure you are - using a <code>RequestProcessor</code> class that extends - <code>org.apache.struts.tiles.TilesRequestProcessor</code>.</p> + using the <code>org.apache.struts.tiles.TilesRequestProcessor</code> + or a <code>RequestProcessor</code> class that extends it.</p> + <source><![CDATA[ + <controller + processorClass="org.apache.struts.tiles.TilesRequestProcessor"/> + ]]></source> + + <p>If you are using Struts 1.3.x, the default + <code>ComposableRequestProcessor</code> can be configured to recognize + Tiles definitions. A chain-config file is included in struts-tiles.jar. + To use it, add the following <code>init-param</code> to the Action + Servlet definition in web.xml.</p> + <source><![CDATA[ + <init-param> + <param-name>chainConfig</param-name> + <param-value>org/apache/struts/tiles/chain-config.xml</param-value> + </init-param> + ]]></source> <p>If you are not using Struts most of the configuration will be found in the web application deployment descriptor as follows:</p> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]