检查jsp中的空字符串

检查jsp中的空字符串,jsp,struts,Jsp,Struts,如何在Struts JSP页面中检查空字符串/空字符串 Struts标签-不起作用?请参见以下内容: String foo = null; if(foo == null or foo.length() ==0) // The string is null <c:if test='${not empty param.whatever}'> ... </c:if> ... 或者,如果要检查的字符串是bean的属性: <logic:empty name="

如何在Struts JSP页面中检查空字符串/空字符串

Struts标签-不起作用?

请参见以下内容:

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

...

或者,如果要检查的字符串是bean的属性:

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

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