0

I am trying to iterate over two 2D arrays Org_Positions_IdTitle and Org_Apps and print out a field but I keep getting the Attribute var invalid for tag iterator according to TLD also in my jsp page the var1 and var2 are underlined and it says on the left Undefined attribute name "var".
I would be so thankful if you can help me with that.

    <s:iterator value="Org_Positions_IdTitle" var="arr1" >
        <s:iterator value="Org_Apps" var="arr2" >
            <s:if test="#arr1[0] == #arr2[1] ">
                <s:property value="#arr1[1]" />     
            </s:if>
        </s:iterator>
    </s:iterator> 
4

1 回答 1

1

您使用哪个版本的 Struts 2?

如果您的版本低于 2.1.x,您应该使用id属性,根据文档:http ://struts.apache.org/release/2.1.x/docs/iterator.html

于 2013-04-22T13:56:02.953 回答