开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜