title: JSP Error: contains invalid expression. Failed to parse the expression
body: <p>I am trying to debug an old jsp site and so I installed tomcat 7 and Netbeans IDE 7.2.1 on my local machine running windows 7 and got everything setup. But when I run it, I am getting an error: </p>
  
  <blockquote>
    <p>SEVERE: Servlet.service() for servlet jsp threw exception
    org.apache.jasper.JasperException: /pages/caselisting.jsp (line: 133, column: 35) "${case.patientmaxdate}" contains invalid expression(s): javax.el.ELException: Failed to parse the expression [${case.patientmaxdate}]</p>
  </blockquote>
  
  <p>The code at that line is: </p>
  
  <pre><code>&lt;td&gt;&lt;c:out default="&amp;nbsp;" escapeXml="false" value="${case.patientmaxdate}"/&gt;&lt;/td&gt;
  </code></pre>
  
  <p>I am very new to jsp and am trying to make some changes to this old site. I did some research and read that Tomcat 7 made some changes for this error. I would appreciate if somebody can guide me in the right direction.</p>
  
  <p>Thanks.</p>
  
  <p>The complete stack trace: </p>
  
  <blockquote>
    <p>SEVERE: Servlet.service() for servlet jsp threw exception
    org.apache.jasper.JasperException: /pages/caselisting.jsp (line: 133,
    column: 35) "${case.patientmaxdate}" contains invalid expression(s):
    javax.el.ELException: Failed to parse the expression
    [${case.patientmaxdate}]  at
    org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:42)
      at
    org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:408)
      at
    org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:199)
      at
    org.apache.jasper.compiler.Validator$ValidateVisitor.checkXmlAttributes(Validator.java:1223)
      at
    org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:875)
      at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1539)
      at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2376)  at
    org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2428)     at
    org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:894)
      at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1539)
      at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2376)  at
    org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2428)     at
    org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2434)     at
    org.apache.jasper.compiler.Node$Root.accept(Node.java:475)    at
    org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2376)   at
    org.apache.jasper.compiler.Validator.validateExDirectives(Validator.java:1795)
      at
    org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:217)
      at org.apache.jasper.compiler.Compiler.compile(Compiler.java:373)   at
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:353)    at
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:340)    at
    org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:646)
      at
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:357)
      at
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)     at
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
      at
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      at
    org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:749)
      at
    org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:487)
      at
    org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:412)
      at
    org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:339)
      at
    org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1056)
      at
    org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:261)
      at
    org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:388)
      at
    org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:316)
      at
    org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:231)
      at
    org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
      at
    org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)     at
    javax.servlet.http.HttpServlet.service(HttpServlet.java:728)  at
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
      at
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      at filter.SecureFilter.doFilter(SecureFilter.java:38)   at
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
      at
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      at
    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
      at
    org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
      at
    org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
      at
    org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
      at
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
      at
    org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
      at
    org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
      at
    org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
      at
    org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
      at
    org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
      at
    org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1822)
      at
    java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
      at
    java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
      at java.lang.Thread.run(Thread.java:722)</p>
  </blockquote>
  
  <p>The complete code surrounding the error line is:</p>
  
  <pre><code> &lt;c:forEach items="${caselist}" var="case"&gt;
     &lt;tr onMouseOver="this.bgColor='#EEEEEE';" onMouseOut="this.bgColor='';"&gt;
      &lt;td&gt;&lt;c:out default="&amp;nbsp;" escapeXml="false" value="${case.patientmaxdate}"/&gt;&lt;/td&gt;
  </code></pre>
  
  <p>Here caselist is an array list. </p>