我在 JSP 页面中有以下行:
<c:if test="${postAuditBean.postAudit.authority == authority.value}">
我想将此比较更改为在比较之前首先修剪左右表达式的前导和尾随空格......就像这样:
<c:if test="${trim(postAuditBean.postAudit.authority) == trim(authority.value)}">
我试过这个:
<c:if test="${fn:trim(postAuditBean.postAudit.authority) == fn:trim(authority.value)}">
这在 JSP 页面中生成了解析错误。
谁能告诉我如何从 JSTL 子表达式中修剪空白?