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 0 being none and 2 being everything. The definitions-parser-validate property determines whether the layout configuration file is validated against the DTD.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset