O'Reilly logo

Struts Kick Start by Kevin Bedell, James Turner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Writing JSP Files for Tiles

To begin, take a look at the stocktrack.default definition. It says that the JSP file that implements this layout can be found in /layouts/stocktrackDefault.jsp. Listing 16.2 shows the contents of this file.

Listing 16.2. The Default JSP Layout File (stocktrackDefault.jsp)
<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles"%>

<tiles:importAttribute name="title"/>
<tiles:insert attribute="header">
  <tiles:put name="title" beanName="title" direct="true"/>
</tiles:insert>
<table width="100%" BORDER="1" CELLPADDING="5">
<TR><TD WIDTH="250" VALIGN="TOP" HALIGN="LEFT">
<tiles:insert attribute="minibar"/>
</TD>
<TD VALIGN="TOP">
<tiles:insert attribute="mainwindow"/>
</TD></TR></TABLE>
</body>
</html>

If you look ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required