使用IteratorStatus对象:
<s:iterator value="lis" status="ctr"> <s:property /> <s:if test="%{#request.str.equals(lis[#ctr.index])}"> -> This value from "lis" is equal to the value of "str" </s:if> <br/></s:iterator>使用 var 参数:
<s:iterator value="lis" var="currentValue"> <s:property /> <s:if test="%{#request.str.equals(#currentValue)}"> -> This value from "lis" is equal to the value of "str" </s:if> <br/></s:iterator>使用
top关键字:
<s:iterator value="lis"> <s:property /> <s:if test="%{#request.str.equals(top)}"> -> This value from "lis" is equal to the value of "str" </s:if> <br/></s:iterator>您可能想阅读该短片
OGNL Language Guide以获得更多详细信息。



