Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Iterating HashSet using JSTL

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 ???

like image 232
Ali Avatar asked Jul 10 '26 01:07

Ali


1 Answers

Yes <c:forEach> works with all Iterable so Set should be good

like image 67
jmj Avatar answered Jul 13 '26 16:07

jmj



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!