views:

37

answers:

2

I need to use a set to not allow duplicate values.

I need to list them out using the JSTL

<c:forEach items="${mySet}" var="set">
   //Code work done here
</c:forEach>

Usually I use the standard array or List here but what are the type restrictions if I want to use a HashSet?

+1  A: 

Check this page: http://www.ibm.com/developerworks/java/library/j-jstl0318/

Hashset implements java.util.Collection so it should work.

Atif
+2  A: 

As of JSTL 1.1 mr2: Collection, Map, arrays, Iterator and Enumeration.

McDowell