读书人

struts2.0中el表达式if判判案句的使用

发布时间: 2012-08-31 12:55:03 作者: rapoo

struts2.0中el表达式if判断语句的使用

在struts2中,jsp页面里使用

<s:if test="${aaa == null}"></s:if>

会报错误:According to TLD or attribute directive in tag file, attribute value does not accept any expressions。

?

正确是使用方法:

<s:if test="%{aaa == null}">       <td width="7%" nowrap>${aaa}</td> </s:if> <s:else>         <td width="7%" nowrap>${bbb}</td> </s:else>
?

?

?

读书人网 >软件架构设计

热点推荐