No EL support in JSTL tags?
843836Feb 11 2004 — edited Nov 28 2007I plan to use both JSTL and JSP 2.0 EL in my JSPs. I tried to use an if-tag, with an expression in the test attribute like this:
<c:if test="${!empty sessionScope.userdata}"><h2><mywaf:include name="userinfo"/></h2></c:if>
The JSTL specs show examples like this, i.e. using JSTL and EL together, which is a natural thing as JSTL actually introduced EL. So why does Tomcat give me an error when I access the page:
org.apache.jasper.JasperException: /jsp/en_EN/template.jsp(14,0) According to TLD or attribute directive in tag file, attribute test does not accept any expressions
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:83)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:402)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:186)
...
I looked into the JSTL core tag tld, and indeed, for every single attribute they specify
<rtexprvalue>false</rtexprvalue>
indicating that this is a "runtime attribute".
So what am I doing wrong here?