我有两个Set小号
Set
set1 contains("A","B","C","D") elements set2 contains("E","F","D","G") elements
我想比较每个元素set1与的每个元素,set2并使用Struts2标签显示匹配的元素。
set1
set2
请尝试以下代码:
<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>