Search code examples
javaspringjspjstlstruts

logic:messagesPresent property attribute; What is the c:if equivalent?


Currently in my JSP I have the following logic tag:

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

I'm trying to replace this logic:messagesPresent tag with a c:if tag instead, but I'm not sure how to handle the property="eve" with c:if. Any ideas?


Solution

  • Just add the property in test attribute:

    You can do it as below:

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