title: In JSP EL enum value always empty
body: <p>When trying to get an EL condition working I found that enum values are completely ignored. This seems to me contrary to the spec.</p>
  
  <pre><code>&lt;c:out value='${com.foobar.data.BookingStatus.FAILED}' /&gt;
  &lt;c:out value='${BookingStatus.FAILED}' /&gt;
  &lt;c:out value='${com.foobar.data.BookingStatus.failed}' /&gt;
  &lt;c:out value='${BookingStatus.failed}' /&gt;
  &lt;c:if test="${empty BookingStatus.FAILED }"&gt;empty&lt;/c:if&gt;
  </code></pre>
  
  <p>To my surprise these all evaluate to <strong>empty</strong>. Why is the Enum class not recognized?
  This is happening in a current stable Tomcat instance.</p>
  
  <p>Can this be a classpath issue? The Enum is used successfully in controller code but nowhere else in JSPs. It is supplied in a jar in the lib directory of the deployment.</p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>My intention is to compare a supplied Integer to an Enum's property like this:</p>
  
  <pre><code>&lt;c:when test='${bookingInformation.bookingStatus eq BookingStatus.FAILED.code}'&gt;
      FOOBARFAIL
  &lt;/c:when&gt;
  </code></pre>
  
  <p>Unfortunately the value being checked can't be changed and will remain an Integer. The Enum looks as follow (simplified):</p>
  
  <pre><code>public enum BookingStatus {
  
      COMPLETED(0), FAILED(1);
  
      private final int code;
  
      private BookingStatus(int code) {
          this.code = code;
      }
  
      public int getCode() {
          return code;
      }
  
  }
  </code></pre>
  
  <p>I want to avoid to hard code the Integer value of FAIL etc. and use the enum instead for the comparison.</p>