File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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!