I ask for some opinions regarding the reference to Java code (in my case the value of the enumeration) in the JSP.
I currently have conditional logic in my JSP:
<c:if test="${actionBean.order.status eq 'complete'}">
show some stuff
</c:if>
Now "complete" is the value associated with the enumeration in my code base. Would it be better to reference the enum inside my JSP? If so, how?
I think this may be good, because: if the enumeration changes, the JSP is not interrupted.
Is it wrong to use Java code in JSP? Or worse, to duplicate the value of "complete"?
Thanks in advance.
source
share