2017-06-01 17 views
0

如何链接多重长度检查?查看JSTL中的多个列表尺寸

我尝试这些方法没有效果:

<c:if test="${fn:length(app.applicationAdminComments) le 0 or fn:length(app.applicationChoComments) le 0 }"> 

<c:if test="${(fn:length(app.applicationAdminComments) le 0) || (fn:length(app.applicationChoComments) le 0)}"> 

但也不是工作。

+0

您是否添加了:<%@ taglib prefix =“fn”uri =“http://java.sun.com/jsp/jstl/functions”%>'? –

+0

它添加了:( – Blawless

回答

1

如果你没有得到一个错误,可能的原因有:

  • app.applicationAdminComments为空
  • app.applicationChoComments为空
  • 长度app.applicationAdminComments的是0
  • app.applicationChoComments的长度为0