Enabling Tiles


Before you can use Tiles, you must make it available. If you merely want to use the Tiles tags in your JSP files, all you have to do is to insert the following line at the top of your JSP file:

 <%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles"%> 

If you want to fully integrate Tiles into Struts, you need to add the following plug-in definition into your strutsconfig.xml file, as well:

 <plug-in className="org.apache.struts.tiles.TilesPlugin" >        <set-property property="definitions-config"                         value="/WEB-INF/stocktrack-tiles.xml" />        <set-property property="definitions-debug" value="2" />        <set-property property="definitions-parser-details" value="2" />        <set-property property="definitions-parser-validate" value="true" /> </plug-in> 

The definitions-debug and definitions-parser-details properties define the level of debugging information that Tiles supplies , with a value of being none and 2 being everything. The definitions-parser-validate property determines whether the layout configuration file is validated against the DTD.



Struts Kick Start
Struts Kick Start
ISBN: 0672324725
EAN: 2147483647
Year: 2002
Pages: 177

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net