【发布时间】:2024-01-06 15:58:01
【问题描述】:
我试图仅根据字符串是否不等于来显示一些内容:
<c:if test="${content.getContentType().getName() != "MCE"}">
<li><a href="#publish-history" id="publishHistoryTab">Publish History</a></li>
</c:if>
它一直抛出错误org.apache.jasper.JasperException: /WEB-INF/jsp/content/manage.jsp(14,60) PWC6212: equal symbol expected
我也试过not eq而不是!=
not equal to 的有效语法是什么?
【问题讨论】:
-
尝试“${not (content.getContentType().getName() eq 'MCE')}”。还要注意你使用的引号,因为上面的表达是不正确的。