我已经在jsp中包含了标记库,如下所述:
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
而且我正在尝试在此代码中使用它:
<c:when test="${fn:length(training.trainingevents) gt 0 }">
但是低于错误
org.apache.jasper.JasperException:找不到在TLD中为函数fn:length指定的类org.apache.taglibs.standard.functions.Functions:org.apache.taglibs.standard.functions.Functions
不确定,有关jstl标记库的错误,但是我可以使用以下代码解决问题,
<c:when test="${not empty training.trainingevents}">
由于较旧的JSTL jar,发生了错误,请使用JSTL 1.2版本解决此问题。它对我有用。