JSTL gt 比较不​​起作用

JSTL gt compare is not working

我不确定为什么这个片段不起作用, 尝试设置长度值然后检查它是否大于 1 以显示删除 link.

<c:set var="test" value="${fn:length(planInfoList)}"/>
    ${test} <!-- here the vale is 2 -->

    <c:if test="${test gt 1}  " >
        <a  href="deletePlanInfo.do?planInfoId=${planInfo.planInfoId }">
<img src="remove.png" />Delete</a>

</c:if>

集合的值为2,但仍然没有显示link,我哪里做错了?

尝试删除 test 属性中的空格:

<c:if test="${test gt 1}  " ></c:if>
                        ^
                   remove here