You can use <c:choose> for this. The equalsIgnoreCase()
can be done by lowercasing the both sides by fn:toLowerCase().
<c:choose>
<c:when test="${fn:toLowerCase(var1) == fn:toLowerCase(var2)}">
Both are equal.
</c:when>
<c:otherwise>
Both are not equal.
</c:otherwise>
</c:choose>
Or when you're targeting a Servlet 3.0 container (Tomcat 7, Glassfish 3, JBoss AS 6, etc) with a web.xml
declared conform Servlet 3.0, then you can invoke the equalsIgnoreCase()
method.
<c:choose>
<c:when test="${var1.equalsIgnoreCase(var2)}">
Both are equal.
</c:when>
<c:otherwise>
Both are not equal.
</c:otherwise>
</c:choose>