JSTL if-statement inside HTML-attribute
It’s also possible to use an EL expression directly like this: <div class=”${booleanExpr ? ‘cssClass’ : ‘otherCssClass’}”> </div>
It’s also possible to use an EL expression directly like this: <div class=”${booleanExpr ? ‘cssClass’ : ‘otherCssClass’}”> </div>
Try: <c:if test = “${ansokanInfo.PSystem == ‘NAT’}”> JSP/Servlet 2.4 (I think that’s the version number) doesn’t support method calls in EL and only support properties. The latest servlet containers do support method calls (ie Tomcat 7).
Overview of JSP Syntax Elements First, to make things more clear, here is a short overview of JSP syntax elements: Directives: These convey information regarding the JSP page as a whole. Scripting elements: These are Java coding elements such as declarations, expressions, scriptlets, and comments. Objects and scopes: JSP objects can be created either explicitly … Read more