<p>Is there a way to use Enum values inside a JSP without using scriptlets.</p>

<p>e.g. </p>

<pre><code>package com.example;

public enum Direction {
    ASC,
    DESC
}
</code></pre>

<p>so in the JSP I want to do something like this</p>

<pre><code>&lt;c:if test="${foo.direction ==&lt;% com.example.Direction.ASC %&gt;}"&gt;...
</code></pre>

You could implement the web-friendly text for a direction within the enum as a field:
```
```
<%@ page import="com.example.Direction" %>
...
<p>Direction is <%=foo.direction.getFriendlyName()%></p>
<% if (foo.direction == Direction.ASC) { %>
<p>That means you're going to heaven!</p>
<% } %>
```
```
but that mixes the view and the model, although for simple uses it can be view-independent ("Ascending", "Descending", etc).
Unless you don't like putting straight Java into your JSP pages, even when used for basic things like comparisons.