2010-08-03 49 views

回答

20

見下文:

<c:if test='${not empty param.whatever}'> 
    ... 
</c:if> 
-5
String foo = null; 
if(foo == null or foo.length() ==0) // The string is null 
4
<logic:empty param="<%= yourString %>"> 

,或者如果你要檢查的字符串是一個bean的屬性:

<logic:empty name="yourBean" property="yourBeanStringProperty">