How to check string inequality in s:if in Struts2

前端 未结 2 1435
伪装坚强ぢ
伪装坚强ぢ 2021-01-26 12:25

I am using tag of Struts2 in one of the jsp-s. It is something like this:


          


        
相关标签:
2条回答
  • 2021-01-26 12:45

    Try this code:

    <s:if test="%{#variable=='String 1'}">
       This is String 1
    </s:if>
    
    0 讨论(0)
  • 2021-01-26 12:59

    You can Compare a String Like:

    <c:if test="%{#request.STATUS!='SINGLE'}">
    ......</br>
    ......<br />
    </c:if>
    
    0 讨论(0)
提交回复
热议问题