Hi,
I may take the problem the wrong way but imagine this situation :
tiles-defs.xml :
<tiles-definitions>
<definition name="portal.main" path="layout/main.jsp">
<put name="title" value="Example from Tiles" />
<put name="header" value="/header.jsp" />
<put name="footer" value="/footer.jsp" />
</definition>
</tiles-definitions>
my layout/main.jsp page :
<HTML>
<HEAD>
<title><tiles:getAsString name="title"/></title>
</HEAD>
<body bgcolor="#ffffff" text="#000000" link="#023264" alink="#023264"
vlink="#023264">
<table border="0" width="100%" cellspacing="5">
<tr>
<td colspan="2"><tiles:insert attribute="header" /></td>
</tr>
<tr>
<td width="140" valign="top">
Nothing
</td>
<td valign="top" align="left">
Nothing at all
</td>
</tr>
<tr>
<td colspan="2">
<tiles:insert attribute="footer" />
</td>
</tr>
</table>
</body>
</html>
My foo.jsp to test the tiles :
<tiles:insert definition="portal.main" flush="true">
<tiles:put name="title" value="Another title" />
</tiles:insert>
This works fine.
Now let's say I want to use a HashMap in my main.jsp that is defined in
foo.jsp
I define the map in foo.jsp just before the call to <tiles:insert> :
<%
Map m = new HashMap();
m.put("aaaaa","AAAAA");
%>
And when I try to print <%=m.get("aaaaa")%> in main.jsp I get an error
saying that m is unknown. Is there any way to pass an object through tiles ?
Or maybe what I am doing is fine from a JSP perspective but not logic for
Struts.
Help appreciated !
Raphaël
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
|