struts2 判断字符串是否存在

用contains

<s:property value="testStr"/>
<s:if test="testStr.contains('判断是否包含的字符串')" >
  包含
</s:if>
<s:else>
  不包含
</s:else>

 refurl:http://heisetoufa.iteye.com/blog/1882259

猜你喜欢

转载自wandejun1012.iteye.com/blog/2166168