2013-03-13 39 views
-1

我在jsp頁面下面的代碼與根源javax.el.E​​LException:

<a href="javascript:void(0)" style="<c:if test="${fn:length(page.likes)}">display:none</c:if>" class="like">Like</a>&nbsp; 

我收到以下異常

javax.el.ELException: Cannot convert 1 of type class java.lang.Integer to class java.lang.Boolean 
org.apache.el.lang.ELSupport.coerceToBoolean(ELSupport.java:207) 
org.apache.el.lang.ELSupport.coerceToType(ELSupport.java:402) 

回答

2

答案是

<c:if test="${(fn:length(page.likes))==0}"> :) 
相關問題