I have a Set of Objects. I want to iterate these objects from set to display it on jsp using JSTL. It is working with List, but I need to use Set.
Is it possible with jstl to iterate a set ?
<c:forEach items="${pitches}" var="pitch" />
In above : pitch has a set of object say Set<employee>
...
How can I iterate this employee set inside pitch ???
I have a Set of Objects. I want to iterate these objects from set to display it on jsp using JSTL. It is working with List, but I need to use Set.
Is it possible with jstl to iterate a set ?
<c:forEach items="${pitches}" var="pitch" />
In above : pitch has a set of object say Set<employee>
...
How can I iterate this employee set inside pitch ???
Share Improve this question edited Mar 4, 2013 at 19:49 Dave Newton 160k27 gold badges260 silver badges307 bronze badges asked Mar 4, 2013 at 19:31 AliAli 1,5902 gold badges20 silver badges30 bronze badges2 Answers
Reset to default 5Yes <c:forEach>
works with all Iterable so Set should be good
JSTL tag <c:forEach>
works with any Collection
implementation
From docs:
The basic iteration tag, accepting many different collection types and supporting subsetting and other functionality