empty keyword in Struts
Is there an empty
keyword in Struts 2 (like in JSP)?
For example in JSP I write:
<c:if test="${empty var}">
Thanks开发者_JAVA技巧
Just test for null.
And to acheive the same effect than the JSTL empty keyword with strings (which means "null or empty"), you need two checks (yes it is tiresome):
<s:if test="foo != null && foo != ''">
精彩评论