Tile Definitions - Use a Tile Definition

First import the tiles tag library with the taglib directive.
<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>

Second include the JSP page that defines the definition with jsp:include.
<jsp:include page="layoutDefinition.jsp"/>

Third use the tiles:insert tag, but specify the definition bean name and scope instead of the tile layout page.
<tiles:insert beanName="layoutDef" beanScope="application">
<tiles:put name="title" type="string"
value="DOG DETAIL" />
<tiles:put name="content" value="dogdetail.jsp"/>

Fourth use the tiles:put attribute to specify title and content only.



Tiles tutorial
Introduction to Tiles
Web Page Layouts
JSP pages with embedded HTML
JSP pages with JSP include directive's (static) or JSP actions (dynamic)
JSP templates
Classic layout
Menu layout
Vertical box or vbox or vstack layout layout
Multi-columns layout
Center layout
Tabs layout
Installing Tiles
For Struts1.0
For Struts1.1
For Tiles stand alone
Configuring Tiles
Internationalizing Tiles
Create a Tile Layout
Use a Tile Layout
Create a Tile Definition
Use a Tile Definition
Use of this website constitutes acceptance of the AllAppLabs.com Terms and Conditions