I'm trying to get this old JSP project running in Tomcat 7, JRE7 but getting this error in most of the pages in the project. Can any one please shed some light whats happening?
The code looks like:
<c:set var="structClass">
<c:if test="${empty param.class}">template</c:if>
<c:if test="${not empty param.class}">${param.class}</c:if>
</c:set>
The error looks like:
org.apache.jasper.JasperException: javax.servlet.ServletException: javax.servlet.jsp.JspException: org.apache.jasper.JasperException: /WEB-INF/templates/template.jsp (line: 77, column: 4) "${empty param.class}" contains invalid expression(s): javax.el.ELException: Failed to parse the expression [${empty param.class}] org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:585) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:455)
it is because of 'class' keyword in the expression try to use
<c:if test="${empty param['class']}">template</c:if>
<c:if test="${not empty param['class']}">${param['class']}</c:if>
refer http://geekomatic.ch/2011/03/22/1300804080000.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With