I have an Enum called Status defined as such:
public enum Status {
VALID("valid"), OLD("old");
private final String val;
Status(String val) {
this.val = val;
}
public String getStatus() {
return val;
}
}
I would like to access the value of VALID
from a JSTL tag. Specifically the test
attribute of the <c:when>
tag. E.g.
<c:when test="${dp.status eq Status.VALID">
I'm not sure if this is possible, so any help would be much appreciated.