tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rahul Akolkar <>
Subject Re: combining tags
Date Wed, 06 Jul 2005 15:55:01 GMT
Tom - Please see reply below:

On 7/6/05, Tom Holmes Jr. <> wrote:
> I used to have some JSP code that looked like:
>  <logic:iterate name="myForm" property="myDataList" id="iter">
>        <html:checkbox name="iter" property="checkedRes" indexed="true"/>
>        <bean:write name="iter" property="roomType"/>
>       <html:text name="iter" property="numItems" indexed="true"
> style="width:40"/>
>  </logic:iterate>
> I'd like to switch to something likes this:
> <c:forEach items="${SelectedRoomsForm.roomsList}" var="data"
> varStatus="status">
>        <html:checkbox name="data" property="checkedRes" indexed="true"/>
>        <c:out value="${data.roomType}"/>
>       <html:text name="data" property="numItems" indexed="true"
> style="width:40"/>
> </c:forEach>
> The <c:out> tag I am sure works, but I am not sure about the
> <html:checkbox> or the <html:text>
> Does this code look ok, or is there something I have to change?

Though you can mix and match JSTL and the Struts taglibs, you should
be aware of the inter-dependencies between specific tags. For example,
the indexed property of the struts-html tags relies on a parent
logic:iterate to produce the resulting name attribute. I recommend
reading this FAQ page [ ] and the TLD docs in

If you stare at the markup generated by the first snippet, that will
tell you what the JSTL snippet should look like.


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

View raw message