This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes Struts and the fly likes Struts Tiles Issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts Tiles Issue" Watch "Struts Tiles Issue" New topic

Struts Tiles Issue

Pooja Salaria

Joined: Mar 24, 2009
Posts: 3
I have a tiles page header.jsp.
I want to pass some parameter to this page using tiles-defs.xml.

my header .jsp

<%@taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %>
<%@taglib uri="/WEB-INF/tlds/struts-tiles.tld" prefix="tiles" %>

<span class="style10"><tiles:getAsString name="headervalue" /></span>

in my tiles-defs.xml,
I have created entry like this -
<definition name="setUpLayout" path="/WEB-INF/atlas/layout/SetUpLayout.jsp">
<put name="title" value="" />
<put name="header" value="/WEB-INF/atlas/tiles/setup/header.jsp" />
<put name="menu" value="../tiles/setup/setupMenu.jsp" />
<put name="body" value="../tiles/setup/setupLanguages.jsp" />
<put name="headervalue" value="My Setup" type="string" />

here i have defined "headervalue". I am able to use this headervalue in my setuplayout.jsp. but not in my header.jsp.
Probably what i have defined in tiles-defs.xml is not correct.
Please tell me the right way.
I agree. Here's the link:
subject: Struts Tiles Issue
It's not a secret anymore!