开发者

JSTL <c:forEach items="${......" what are the type restrictions

开发者 https://www.devze.com 2023-01-13 17:18 出处:网络
I need to 开发者_如何学Cuse a set to not allow duplicate values. I need to list them out using the JSTL

I need to 开发者_如何学Cuse 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?


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


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

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

0

精彩评论

暂无评论...
验证码 换一张
取 消