我有两个字符串,我需要比较,但即使他们有相同的值或不同,它总是输入语句…
<c:when test="#{bean.name1 != bean.name2}"> fields that are supposed to appear _only_ when name1 is different from name2 </c:when>
解决方法
问题是你可能没有在选择标签中包装.
如果你有:
<c:choose> <c:when test="${bean.name1 != bean.name2}"> fields that are supposed to appear _only_ when name1 is different from name2 </c:when> </c:choose>
它会奏效