You can do it quite easily with JSTL...
<c:forEach var="row" items="${tabledata}" varStatus="info">
<c:set var="tdclass" value="blue-row"/>
<c:if test="${info.count % 2 == 0}">
<c:set var="tdclass" value="red-row"/>
</c:if>
<td class="<c:out value='${tdclass}'/>">Data</td>
</c:forEach>
> -----Original Message-----
> From: Mark Galbreath [mailto:[EMAIL PROTECTED]]
> Sent: Friday, February 07, 2003 9:35 AM
> To: 'Struts Users Mailing List'
> Subject: RE: Rendering alternate rows of a table in Struts
>
>
> No. You have to use a scriptlet. But remember -
> philosophical purity should always yield to pragmatism.
>
> Mark
>
> -----Original Message-----
> From: Ritesh Singhal [mailto:[EMAIL PROTECTED]]
> Sent: Friday, February 07, 2003 9:19 AM
>
> I am using logic iterate tag to iterate over a collection and
> display the contents of the collection in the form of a
> table. I want to render the alternate rows with different
> background colours. I don't want to use scriptlet for finding
> the row number and set the colour. Is there any Struts tag
> where I can specify such functionality.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]