我正在开发一个计划在 Heroku 上部署的 Spring MVC 服务应用程序。当我使用 Jetty 部署应用程序git push
并且该应用程序依赖于 Jetty 时,一切正常。然后我决定从应用程序中删除 Jetty,将应用程序拆分为几个模块,使用 Maven 将其捆绑到一个 WAR 中并将该 WAR 部署到 Heroku(有效地将我的应用程序部署到 Tomcat 7)。应用程序的服务部分继续正常工作,但 JSP 开始抛出奇怪的异常:
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 12 in the jsp file: /WEB-INF/jsp/createOrder.jsp
The method proprietaryEvaluate(String, Class<Boolean>, PageContext, null, boolean) is undefined for the type PageContextImpl
9: </head>
10: <body>
11: <c:choose>
12: <c:when test="${success}">
13: Order successfully created
14: </c:when>
15: <c:otherwise>
堆栈跟踪:
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:102)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:331)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:468)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:378)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:353)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:340)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:646)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:357)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:238)
org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:262)
org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1180)
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:950)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:789)
javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
看起来好像EL不起作用。
有没有其他人遇到过这个或类似的问题,有人知道如何解决吗?