My JSP page accesses several attributes, as in the following section:
<div id="ep-error-title">Error ${errorCode}: ${errorMessage} <!-- error number and text -->
</div>
What I want to do is to be able to access the errorCode within JSP statements, so I can do something like:
<% if ("1".equals(errorCode)) { %>
<%@ include file="stuffFor1.inc" %>
<% } else { %>
<%@ include file="stuffForEverythingElse.inc" %>
<% } %>
The problem is the EQUAL test; how do I access the value (which was shown by ${errorCode} when outside the JSP section) when I'm inside the JSP section? Sorry if this seems obvious, but I haven't worked hardly at all with either Spring or JSP.