Struts: Embedded Tiles

G

gilgantic

I am new to Struts and Tiles. Looking at the 3 sample files below
(tiles-def.xml, basicLayout.jsp, header.jsp) is it possible to have
tiles inside of the header.jsp? If so, then how do I update my
tiles-def.xml to send "hdrTitle"
and "hdrContent" into the header.jsp?

tiles-def.xml
=============
<definition name=".basic.layout" path="/basicLayout.jsp >
<put name="header" value="/header.jsp"/>
<put name="content" value="/content.jsp"/>
</definition>


basicLayout.jsp
====================
<html>
<header><title>Basic JSP</title>
<body>
<tiles:get name="header"/>
<tiles:get name="content"/><br/>
</body>
</html>

header.jsp
====================
<body>
<tiles:get name="hdrTitle"/><br/>
<tiles:get name="hdrContent"/>
</body>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top