Greg, 1- create one layout.jsp:
<%@ taglib uri="http://jakarta.apache.org/struts/tags-tiles" prefix="tiles" %> <HTML> <HEAD> <title> </title> </head> <body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0"> <table width="794" border="0" cellspacing="0" cellpadding="0"> <tr> <td colspan="2"><tiles:insert attribute="header"/></td> </tr> <tr > <td width="30%" valign="top"><tiles:insert attribute="left"/></td> <td ><tiles:insert attribute="body"/></td> </tr> </table> </body> </html> 2 - add following entry in struts-config.xml <action path="/test" type="org.apache.struts.actions.ForwardAction" parameter="global.test" /> If you want you can use your own action, in that case you have to provide method and forward name also. if you want more detail about this let me know. 3 - add following entry in tiles-def.xml <!DOCTYPE tiles-definitions PUBLIC "-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN" "http://struts.apache.org/dtds/tiles-config_1_1.dtd"> <!-- Definitions for Tiles documentation --> <tiles-definitions> <!-- Main page layout used as a root for other pages defintion. --> <definition name="site.mainLayout" path="/common/layout.jsp"> <put name="title" value="Home Title" /> <put name="header" value="/header.jsp" /> <put name="left" value="/leftMenu.jsp" /> </definition> <definition name="global.test" extends="site.mainLayout" > <put name="body" value="/test.jsp" /> </definition> </tiles-definitions> 4- add following link in your jsp: <html:link action="/test">Test Link</html:link> try it and let me know if you have any issue. Sunil Greg Reddin <[EMAIL PROTECTED]> 01/10/2005 03:23 Please respond to "Struts Users Mailing List" <user@struts.apache.org> To "Struts Users Mailing List" <user@struts.apache.org> cc Subject Re: Action mapping to a Tile Are you using the TilesRequestProcessor? In struts-config.xml: <controller processorClass="org.apache.struts.tiles.TilesRequestProcessor"/> Also make sure the Tiles Plugin is configured: <plug-in className="org.apache.struts.tiles.TilesPlugin" > <!-- Path to XML definition file --> <set-property property="definitions-config" value="/WEB-INF/tiles-defs.xml" /> <!-- Set Module-awareness to true --> <set-property property="moduleAware" value="true" /> </plug-in> Greg On Sep 30, 2005, at 4:47 PM, Graham Reeds wrote: > I'm trying to set an action mapping to a tile. > > I have a jsp page with a link to Tester: <a href="pages/ > Tester">Test</a> > > In my struts-config.xml I have a forward mapped: <action > path="pages/Tester" forward="Test.page" /> > > And in tile-def.xml I have Test.page defined: > <definition name="Test.page" extends="Main.layout"> > <put name="title" value="Test" /> > </definition> > > However this gives a 404 for the page test/pages/Tester > > I thought it might be that the application hasn't been updated so I > stopped and restarted Tomcat and that had no effect - still 404's. > > Anything else I need to check? > > Thanks Graham Reeds. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]