<p>I have an Enum called Status defined as such:</p>

<pre><code>public enum Status { 

    VALID("valid"), OLD("old");

    private final String val;

    Status(String val) {
        this.val = val;
    }

    public String getStatus() {
        return val;
    }

}
</code></pre>

<p>I would like to access the value of <code>VALID</code> from a JSTL tag. Specifically the <code>test</code> attribute of the <code>&lt;c:when&gt;</code> tag. E.g.</p>

<pre><code>&lt;c:when test="${dp.status eq Status.VALID"&gt;
</code></pre>

<p>I'm not sure if this is possible.</p>

So to get my problem fully resolved I needed to do the following:
```
```
<% pageContext.setAttribute("old", Status.OLD); %>
```
```
Then I was able to do:
```
```
<c:when test="${someModel.status == old}"/>...</c:when>
```
```
which worked as expected.