引入标签:

<%@ taglib preflx="logic" uri="http://struts.apache.org/tags-logic"%>

<logic:empty name="attr1">

  attr1为空

</logic:empty>

<logic:notempty name="attr1">

attr1不为空

</logic:notempty>

<logic:present name="attr1">

attr1存在

</logic:present>

<logic:notpresent name="attr1">

attr1不存在

</logic:notpresent>

//id表示的是scope中集合在迭代中的某个元素

<logic:iterate id="u" name="userlist">

  <bean:write name="u" property="u.username"/>

</logic:iterate>

posted on 2011-02-13 13:37  魔战  阅读(288)  评论(0编辑  收藏  举报