【问题标题】:logic:messagesPresent property attribute; What is the c:if equivalent?逻辑:messagesPresent 属性属性;什么是 c:if 等效项?
【发布时间】:2018-07-31 16:05:28
【问题描述】:

目前在我的 JSP 中,我有以下 logic 标签:

                <logic:messagesPresent property="eve">
                    <span class="form-error">
                </logic:messagesPresent> 

我正在尝试用c:if 标记替换这个logic:messagesPresent 标记,但我不确定如何用c:if 处理property="eve"。有什么想法吗?

【问题讨论】:

    标签: java spring jsp jstl struts


    【解决方案1】:

    只需在 test 属性中添加属性:

    你可以这样做:

     <c:if test = "${not empty eve}">
            <span class="form-error">
     </c:if>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2014-01-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2010-11-19
      相关资源
      最近更新 更多