我有两套
set1 contains("A","B","C","D") elements
set2 contains("E","F","D","G") elements
我想将set1的每个元素与set2的每个元素进行比较,并使用Struts2标签显示匹配的元素.
解决方法:
请尝试以下代码:
<s:iterator var="val1" value="set1">
<s:iterator var="val2" value="set2">
<s:if test="#val1 == #val2">
<s:property /><br>
</s:if>
</s:iterator>
</s:iterator>