struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Amleto Di Salle" <disa...@di.univaq.it>
Subject R: looping question
Date Tue, 04 May 2004 18:07:12 GMT
you can solve the problem in two ways:

1)
<c:forTokens delims="," items="1,2,3,4" var="row">
    <c:out value="${row}"/>
</c:forTokens>

2)
<c:forEach items="5,6,7,8" var="row">
    <c:out value="${row}"/>
</c:forEach>

BR
/Amleto

-----Messaggio originale-----
Da: Frank Maritato [mailto:frank.maritato@overture.com] 
Inviato: martedì 4 maggio 2004 19.55
A: user@struts.apache.org
Oggetto: looping question


Is there a way to loop over a counter (not over a collection) in either 
struts or jstl? Looked like logic:iterate and c:forEach both require a 
collection.

Something like this:

<c:for begin="1" end="5">
</c:for>

I really don't want to create a collection of Integer objects to get 
around this...any ideas?
-- 
Frank Maritato

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message