Thank You,
both ways work correctly,
my idea was to write an equivalent of something like this:
for(int i=0, int j=0; i<10, j>20;i++;j--)
alex
-----Original Message-----
From: Shawn Bayern [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 15, 2002 3:38 PM
To: Tag Libraries Users List
Subject: RE: Compress the HTML code
On Mon, 15 Jul 2002, Alex Reznik wrote:
> If i were to iterate over two sets of parameters, is there a way to
specify
> their values within one forEach loop?
It depends on what you really want to do. You can iterate over numbers
and apply them as indices over two arrays or List objects, like this:
<c:forEach var="i" begin="0" end="${end}">
<c:out value="${a[i]}" />
<c:out value="${b[i]}" />
</c:forEach>
Or you can iterate over one array and use 'count' from 'varStatus' as the
index into another:
<c:forEach items="${a}" var="aItem" varStatus="s">
<c:out value="${a}" />
<c:out value="${b[s.count]}" />
</c:forEach>
If you're looking for something else, please feel free to clarify. Hope
this helps,
--
Shawn Bayern
"JSTL in Action" http://www.jstlbook.com
(coming in July 2002 from Manning Publications)
--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>