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"/>
</tiles:insert>
Fourth
use the tiles:put attribute to specify title
and content only.
|