struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Schyman <>
Subject Feeding tiles:insert with bean:write?
Date Thu, 01 Aug 2002 11:22:20 GMT

I'm trying to create a tiles-layout that will iterate over a putList
and insert each item as a tile, much as in the provided example
vboxLayout.jsp found in tiles-documentation.war. However, while that
example uses a java.util.Iterator to do this, I want to populate a
bean and iterate over it using logic:iterate, and this works fine,
but I can't feed the bean:write to tiles:insert. Can't I do this?

My template looks like this:
<%@ page language="java" %>
<%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/tlds/struts-tiles.tld" prefix="tiles" %>

<tiles:importAttribute scope="page"/>

<logic:iterate id="module"
<%-- This does not work --%>
	<tiles:insert name="<bean:write name="module"
<%-- This works 
	<bean:write name="module" property="value"/>

When I run it with tiles:insert active, I get the following error:
[ServletException in:/WEB-INF/jsp/layouts/moduleLayout.jsp]
/WEB-INF/jsp/layouts/moduleLayout.jsp(10,45) Attribute module has
no value'

If this isn't possible, I guess I could use java.util.Iterator, but
I want to keep the tamplate as clean from java as possible.

Best regards,

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message