Author: greddin Date: Tue Nov 1 08:59:27 2005 New Revision: 330092 URL: http://svn.apache.org/viewcvs?rev=330092&view=rev Log: More documentation changes: - Added structure for User's Guide - Added structure for Examples - Updated Installation.
Added: struts/tiles/trunk/xdocs/examples.xml (with props) struts/tiles/trunk/xdocs/usersGuide.xml (with props) Modified: struts/tiles/trunk/xdocs/installation.xml struts/tiles/trunk/xdocs/navigation.xml Added: struts/tiles/trunk/xdocs/examples.xml URL: http://svn.apache.org/viewcvs/struts/tiles/trunk/xdocs/examples.xml?rev=330092&view=auto ============================================================================== --- struts/tiles/trunk/xdocs/examples.xml (added) +++ struts/tiles/trunk/xdocs/examples.xml Tue Nov 1 08:59:27 2005 @@ -0,0 +1,55 @@ +<?xml version="1.0"?> +<document url="./examples.xml"> +<properties> + <title>The Tiles 1.1 Framework Project - Examples</title> +</properties> + +<body> + +<section name="Creating Templates"> + + <subsection name="Basic Template"> + </subsection> + + <subsection name="Specify Attribute Types"> + </subsection> + + <subsection name="Set Attribute With Tag Body"> + </subsection> + + <subsection name="Using Inheritance: Overloading parameters"> + </subsection> + + <subsection name="No Body Defined"> + </subsection> + + <subsection name="List Usage"> + </subsection> +</section> + +<section name="JSP Usage"> + <subsection name="Defining Tiles In A JSP Page"> + </subsection> + + <subsection name="Inserting Definitions Defined In A Factory"> + </subsection> + + <subsection name="Overloading Attributes"> + </subsection> +</section> + +<section name="Tiles Controllers"> +</section> + +<section name="Using Tiles With Struts"> + + <subsection name="Tiles Controller Invoking a Struts Action"> + </subsection> + + <subsection name="Forwarding To A Tiles Definition"> + </subsection> + +</section> + +</body> +</document> Propchange: struts/tiles/trunk/xdocs/examples.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: struts/tiles/trunk/xdocs/examples.xml ------------------------------------------------------------------------------ svn:keywords = Author Date Id Modified: struts/tiles/trunk/xdocs/installation.xml URL: http://svn.apache.org/viewcvs/struts/tiles/trunk/xdocs/installation.xml?rev=330092&r1=330091&r2=330092&view=diff ============================================================================== --- struts/tiles/trunk/xdocs/installation.xml (original) +++ struts/tiles/trunk/xdocs/installation.xml Tue Nov 1 08:59:27 2005 @@ -88,19 +88,17 @@ <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 initializes the factory and catches Struts action - forwards to check for definition name. - <pre> - <servlet> - ... - <servlet-name>action</servlet-name> - <servlet-class>org.apache.struts.action.ActionServlet</servlet-class - <init-param> - <param-name>definitions-config</param-name> - <param-value>/WEB-INF/tiles-config.xml</param-value> - </init-param> - ... -</pre> + </code> that responds to Struts actions. You will 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. + <source><![CDATA[ + <plug-in className="org.apache.struts.tiles.TilesPlugin"> + <set-property + property="definitions-config" + value="/WEB-INF/tiles-defs.xml"/> + </plug-in> + ]]></source> </li> <li><strong>Using Tiles Without Struts</strong> - If you don't want to use Struts, use the @@ -114,26 +112,35 @@ </li> <li>Modify the <code>WEB-INF/web.xml</code> file of your web application to include the following tag library declarations: - Note that this step is not necessary in a Servlet 2.4 envrironment.</li> - </ul> -<pre><taglib> - <taglib-uri>/WEB-INF/tiles.tld</taglib-uri> - <taglib-location>/WEB-INF/tiles.tld</taglib-location> -</taglib> -</pre> + Note that this step is not necessary in a Servlet 2.3/2.4 envrironment. + <source><![CDATA[ +<taglib> + <taglib-uri>/WEB-INF/tiles.tld</taglib-uri> + <taglib-location>/WEB-INF/tiles.tld</taglib-location> +</taglib> + ]]></source> + </li> + </ul> <ul> <li>At the top of each JSP page that will use the Tiles custom tags, add line(s) declaring the Tiles custom tag libraries used on this - particular page, like this:</li> + particular page, like this: + + <source><![CDATA[ + <%@ taglib uri="/WEB-INF/tiles.tld" prefix="tiles" %> + ]]></source> + + </li> </ul> -<pre><%@ taglib uri="/WEB-INF/tiles.tld" prefix="tiles" %> -</pre> <ul> - <li>For Servlet 2.4 applications replace the above taglib reference with - the following:</li> -<pre><%@ taglib uri="http://jakarta.apache.org/tiles" prefix="tiles" %> -</pre> + <li>For Servlet 2.3/2.4 applications replace the above taglib reference with + the following: + + <source><![CDATA[ + <%@ taglib uri="http://jakarta.apache.org/tiles" prefix="tiles" %> + ]]></source> + </li> <li>When compiling the Java classes that comprise your application, be sure to include the <code>tiles.jar</code> and <code>commons-*.jar</code> files (copied earlier) on the @@ -151,10 +158,12 @@ <li>You should also initialize a <code>TilesRequestProcessor</code>.</li> <li>To do so, add following lines in your <code>struts-config.xml</code> file : -<pre> - <controller processorClass="org.apache.struts.tiles.TilesRequestProcessor"> - </controller> -</pre> + + <source><![CDATA[ + <controller processorClass="org.apache.struts.tiles.TilesRequestProcessor"> + </controller> + ]]></source> + </li> </ul> </section> Modified: struts/tiles/trunk/xdocs/navigation.xml URL: http://svn.apache.org/viewcvs/struts/tiles/trunk/xdocs/navigation.xml?rev=330092&r1=330091&r2=330092&view=diff ============================================================================== --- struts/tiles/trunk/xdocs/navigation.xml (original) +++ struts/tiles/trunk/xdocs/navigation.xml Tue Nov 1 08:59:27 2005 @@ -9,6 +9,8 @@ <menu name="Tiles"> <item href="index.html" name="Tiles Home"/> <item href="installation.html" name="Installation"/> + <item href="usersGuide.html" name="Users Guide"/> + <item href="examples.html" name="Examples"/> </menu> <menu name="Taglib Reference"> <item name="Struts Tiles" href="tagreference-struts-tiles.html"/> Added: struts/tiles/trunk/xdocs/usersGuide.xml URL: http://svn.apache.org/viewcvs/struts/tiles/trunk/xdocs/usersGuide.xml?rev=330092&view=auto ============================================================================== --- struts/tiles/trunk/xdocs/usersGuide.xml (added) +++ struts/tiles/trunk/xdocs/usersGuide.xml Tue Nov 1 08:59:27 2005 @@ -0,0 +1,138 @@ +<?xml version="1.0"?> +<document url="./usersGuide.xml"> +<properties> + <title>The Tiles 1.1 Framework Project - Users Guide</title> +</properties> + +<body> + +<section name="Tiles Configuration"> + + <subsection name="Web Application Configuration"> + <p>There are several ways to configure your web application to use Tiles. The + method you choose depends on whether you are using Tiles with another + framework, like Struts, and which version of the Servlet specification + you are targeting.</p> + + <p>If you are using Tiles with Struts you do not need to specify the + Tiles configuration files in the web application deployment descriptor. + Instead you reference the Tiles configuration file(s) in your Struts + configuration using a Plugin. The configuration should look like this: + </p> + + <source><![CDATA[ + <plug-in className="org.apache.struts.tiles.TilesPlugin"> + <set-property + property="definitions-config" + value="/WEB-INF/tiles-defs.xml"/> + </plug-in> + ]]></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> + + <p>If you are not using Struts most of the configuration will be found in + the web application deployment descriptor as follows:</p> + + <source><![CDATA[ + <servlet> + <servlet-name>Tiles Servlet</servlet-name> + <servlet-class>org.apache.tiles.servlets.TilesServlet</servlet-class> + <init-param> + <param-name>definitions-config</param-name> + <param-value>/WEB-INF/tiles-defs.xml</param-value> + </init-param> + <load-on-startup>1</load-on-startup> + </servlet> + ]]></source> + + <p>Tiles will work with applications based on the Servlet 2.2 specification. + If your application is Servlet 2.2-based you will need to include the TLD + files under your WEB-INF directory and include the following taglib + declaration in the deployment descriptor: + + <source><![CDATA[ +<taglib> + <taglib-uri>/WEB-INF/tiles.tld</taglib-uri> + <taglib-location>/WEB-INF/tiles.tld</taglib-location> +</taglib> + ]]></source> + + You will also need to reference the taglib from each JSP page in the + following manner: + + <source><![CDATA[ + <%@ taglib uri="/WEB-INF/tiles.tld" prefix="tiles" %> + ]]></source> + + </p> + + <p>If your application is targeting the Servlet 2.3/2.4 specification you + do not need to declare the tag libraries in the deployment descriptor. + They are declared in the Tiles jar file that should be deployed with your + web application. In Servlet 2.3/2.4 containers you would reference the + taglib in JSP pages like this: + + <source><![CDATA[ + <%@ taglib uri="http://jakarta.apache.org/tiles" prefix="tiles" %> + ]]></source> + + </p> + </subsection> + + <subsection name="XML Definitions Configuration"> + <p>This section provides an overview of the Tiles XML configuration mechanism. + </p> + + <source><![CDATA[ + <?xml version="1.0" encoding="ISO-8859-1" ?> + + <!DOCTYPE tiles-definitions PUBLIC + "-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN" + "http://jakarta.apache.org/struts/dtds/tiles-config_1_1.dtd"> + + <tiles-definitions> + + <definition name="mainLayout" path="/common/layouts/classicLayout.jsp"> + <put name="title" value="Sample Page Title" /> + <put name="header" value="/common/header.jsp" /> + <put name="menu" value="mainMenu" /> + <put name="footer" value="/common/footer.jsp" /> + <put name="body" value=".portal.body" /> + </definition> + + <definition name="mainMenu" path="/common/layouts/vboxLayout.jsp" > + <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> + + </tiles-definitions> + ]]></source> + + </subsection> +</section> + +<section name="Using Tiles"> + <subsection name="Inserting Tiles Into A JSP Page"> + </subsection> + + <subsection name="Using Tiles Controllers"> + </subsection> + + <subsection name="Definitions Factory"> + </subsection> +</section> + + +</body> +</document> Propchange: struts/tiles/trunk/xdocs/usersGuide.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: struts/tiles/trunk/xdocs/usersGuide.xml ------------------------------------------------------------------------------ svn:keywords = Author Date Id --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]