How to compare if the string is not equal?

I am trying to show only something based on the fact that the string is not equal:

<c:if test="${content.getContentType().getName() != "MCE"}"> <li><a href="#publish-history" id="publishHistoryTab">Publish History</a></li> </c:if> 

It continues to throw an org.apache.jasper.JasperException: /WEB-INF/jsp/content/manage.jsp(14,60) PWC6212: equal symbol expected error org.apache.jasper.JasperException: /WEB-INF/jsp/content/manage.jsp(14,60) PWC6212: equal symbol expected

I also tried not eq instead !=

What is the valid syntax for not equal to ?

+51
java jsp jstl
Aug 27 2018-12-12T00:
source share
1 answer

Either != , Or ne will work , but you need to get the access syntax and the enclosed quotes are sorted.

 <c:if test="${content.contentType.name ne 'MCE'}"> <%-- snip --%> </c:if> 
+100
Aug 27 '12 at 14:57
source share



All Articles