转载网址:http://blog.csdn.net/menhuanxiyou/article/details/5709550
1:直接写表达式
<s:set name="china" value="china">
<s:if test="${china=='china'}">show</s:if>
result:show
</s:set>
<s:set name="count" value="99">
<s:if test="${count>0}">bigger than 0</s:if>
<s:else>not</s:else>
result:bigger than 0
</s:set>
2:直接读对象
<s:if test="request.price==null || request.price>=0"></s:if>
3:直接读对象的另一种写法
<s:if test="%{设置到action中的值!=null}"></s:if>
4:判断多个条件
<s:if test='%{isShowAll=="Y" || isShowAll==null || isShowAll==""}'>
<li class="selected"></li>
</s:if>
<s:else>
<li>else</li>
</s:else>
5:在遍历里面用判断
<s:iterator id="id" value="lable">
<s:if test="%{#id.attrValue!=0}">
<s:property value="id.attrValue"/>
</s:if>
</s:iterator>