Access Enum value using EL with JSTL

Solution 1:

A simple comparison against string works:

<c:when test="${someModel.status == 'OLD'}">

Solution 2:

If using Spring MVC, the Spring Expression Language (SpEL) can be helpful:

<spring:eval expression="dp.status == T(com.example.Status).VALID" var="isValid" />
<c:if test="${isValid}">
   isValid
</c:if>