2010-08-03 46 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">