struts2 <s:if test="'sstring' in ${listValue}" >
Action中指定数据
private List<String> s = new ArrayList<String>();
s.add("mead");
s.add("lai");
s.add("amy");
页面中:
<s:if test="'mead' in ${s}" >
It is true,
</s:if>
<s:else>
It is false,
</s:else>
上面输出的是It is false,
-----------------------------
如果页面中写成
<s:if test="'mead' in {'mead','amy','lai'}" >
It is true,
</s:if>
<s:else>
It is false,
</s:else>
这样就输出的是It is true,
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
请问我的ognl写的有什么问题吗?
谢谢
------解决方案--------------------接分了