Mixing expressions and expression language (<%= %> inside of c:if)
- by Jack
I need to access some constants in my jsp, and sadly the EL does not offer any functionality for it.
There are some options like the unstandard tag library, but I'd like to keep it a bit more standard.
I tried:
<%@ page import = "com.jackdane.Constants"%>
<c:if test="${object.display == '<%=com.jackdane.Constants.YES %>}'">
//some display logic
</c:if>
But that doesn't appear to do the trick.
It's been a while since I've used an expression so I might have made an error. Any input is appreciated.
Edit:
To clarify, the constants class is not in my control. It's inside a jar file that I recieved.
It contains no getters/setters.
Just private static final Strings.