如果在jsp中List不为空或为null,如何创建条件?

时间:2015-05-04 20:46:31

标签: jsp

收到的控制器列表。如何检查它是否为空,然后显示一些信息,否则跳过show。

<c:forEach items="${itemList}" var="item">

1 个答案:

答案 0 :(得分:1)

<c:if test="${!empty itemList}">
    the list is neither empty nor null
</c:if>