Spring MVC,Tile 不呈现 jsp 页面,而 运行 war 文件码头亚军

Spring MVC,Tile not rendering jsp page while running war file jetty Runner

我正在使用 spring、hibernate、tile、jsp 和 jetty server.I 遇到以下错误,
问题是 运行 war 文件时 tile 不呈现页面。
错误与 EL 标签有关。但是 运行 mvn clean jetty:run.
没有问题 我在制作包时无法理解问题所在。
我 pom 中的每个 jar 都在我解压缩 war 并检查的 lib 文件夹中。
我正在使用 spring MVC 4.1,jstl-1.2,jetty-runner 9.3.3.v20150827.
我的网络应用程序版本是 web-app 2.5。我已尝试将 web-app 的版本更改为 3,并在我的 jsp 页面中添加了 isELIgnored false,但无法正常工作。
我希望有人会帮助,在此先感谢。 以下是错误,

Caused by:
org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.apache.tiles.request.render.CannotRenderException: ServletException including path '/WEB-INF/views/pages/login.jsp'.
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:978)
    at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:857)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
    at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:842)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
    at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:816)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1686)
    at com.zeetap.phrs.ctrl.account.corsfilter.CorsFilter.doFilter(CorsFilter.java:32)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:581)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
    at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1156)
    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)
    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1088)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
    at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213)
    at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:109)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:119)
    at org.eclipse.jetty.server.Server.handle(Server.java:517)
    at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:306)
    at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:242)
    at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:245)
    at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
    at org.eclipse.jetty.io.SelectChannelEndPoint.run(SelectChannelEndPoint.java:75)
    at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceAndRun(ExecuteProduceConsume.java:213)
    at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:147)
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:654)
    at org.eclipse.jetty.util.thread.QueuedThreadPool.run(QueuedThreadPool.java:572)
    at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.tiles.request.render.CannotRenderException: ServletException including path '/WEB-INF/views/pages/login.jsp'.
    at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:399)
    at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:238)
    at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:221)
    at org.apache.tiles.renderer.DefinitionRenderer.render(DefinitionRenderer.java:59)
    at org.springframework.web.servlet.view.tiles3.TilesView.renderMergedOutputModel(TilesView.java:114)
    at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:303)
    at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1228)
    at org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1011)
    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:955)
    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:877)
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:966)
    ... 31 more
Caused by: java.io.IOException: ServletException including path '/WEB-INF/views/pages/login.jsp'.
    at org.apache.tiles.request.servlet.ServletUtil.wrapServletException(ServletUtil.java:63)
    at org.apache.tiles.request.servlet.ServletRequest.forward(ServletRequest.java:267)
    at org.apache.tiles.request.servlet.ServletRequest.doForward(ServletRequest.java:228)
    at org.apache.tiles.request.AbstractClientRequest.dispatch(AbstractClientRequest.java:57)
    at org.apache.tiles.request.render.DispatchRenderer.render(DispatchRenderer.java:47)
    at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:259)
    at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:397)
    ... 41 more
Caused by: org.apache.jasper.JasperException: Unable to compile class for JSP: 
An error occurred at line: 107 in the jsp file: /WEB-INF/views/pages/login.jsp
The method proprietaryEvaluate(String, Class<String>, PageContext, null) is undefined for the type PageContextImpl
104: 
105:         <c:if test="true">
106:            <h4>
107:                <span><font color="green"><b> ${SUCCESS_MSSAGE}</b></font> </span>
108:            </h4>
109:        </c:if>
110:        <c:if test="${(ERROR_MSSAGE != null) }">
An error occurred at line: 110 in the jsp file: /WEB-INF/views/pages/login.jsp
The method proprietaryEvaluate(String, Class<Boolean>, PageContext, null) is undefined for the type PageContextImpl
107:                <span><font color="green"><b> ${SUCCESS_MSSAGE}</b></font> </span>
108:            </h4>
109:        </c:if>
110:        <c:if test="${(ERROR_MSSAGE != null) }">
111:            <h4>
112:                <span><font color="red"><b> ${ERROR_MSSAGE}</b></font> </span>
113:            </h4>
An error occurred at line: 112 in the jsp file: /WEB-INF/views/pages/login.jsp
The method proprietaryEvaluate(String, Class<String>, PageContext, null) is undefined for the type PageContextImpl
109:        </c:if>
110:        <c:if test="${(ERROR_MSSAGE != null) }">
111:            <h4>
112:                <span><font color="red"><b> ${ERROR_MSSAGE}</b></font> </span>
113:            </h4>
114:        </c:if> 
115:        <!-- BEGIN LOGIN FORM -->
An error occurred at line: 118 in the jsp file: /WEB-INF/views/pages/login.jsp
The method proprietaryEvaluate(String, Class<Boolean>, PageContext, null) is undefined for the type PageContextImpl
115:        <!-- BEGIN LOGIN FORM -->
116:        <form class="login-form" action="authenticate.html" method="post">
117:            <c:choose>
118:            <c:when test="${'L' == loginpage }">style="display: block;"</c:when>
119:            <c:otherwise>style="display: none;"</c:otherwise>
120:            </c:choose>
121: 
An error occurred at line: 186 in the jsp file: /WEB-INF/views/pages/login.jsp
The method proprietaryEvaluate(String, Class<Boolean>, PageContext, null) is undefined for the type PageContextImpl
183:        <!-- BEGIN FORGOT PASSWORD FORM -->
184:        <form class="forget-form" action="reqRestPwd.html" method="post"
185:            <c:choose>
186:            <c:when test="${'F' == loginpage }">style="display: block;"</c:when>
187:            <c:otherwise>style="display: none;"</c:otherwise>
188:            </c:choose>>
189: 
An error occurred at line: 306 in the jsp file: /WEB-INF/views/pages/login.jsp
The method proprietaryEvaluate(String, Class<Object>, PageContext, null) is undefined for the type PageContextImpl
303: 
304:                    <form:option value="">
305:                    </form:option>
306:                    <form:options items="${reflist}"></form:options>
307: 
308: 
309: 
Stacktrace:
    at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:102)
    at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:198)
    at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:450)
    at org.apache.jasper.compiler.Compiler.compile(Compiler.java:361)
    at org.apache.jasper.compiler.Compiler.compile(Compiler.java:336)
    at org.apache.jasper.compiler.Compiler.compile(Compiler.java:323)
    at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:585)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:363)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:396)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:340)
    at org.eclipse.jetty.jsp.JettyJspServlet.service(JettyJspServlet.java:107)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
    at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:816)
    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:583)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
    at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:566)
    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1156)
    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)
    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1088)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
    at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:199)
    at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:74)
    at org.apache.tiles.request.servlet.ServletRequest.forward(ServletRequest.java:265)
    ... 46 more

1) 从您的 pom.xml 文件中删除所有 org.mortbay.jetty jsp 和 jstl 依赖项。

2) 将Web.xml设置为这个

<web-app
xmlns="http://java.sun.com/xml/ns/javaee" 
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
id="Your_Webapp_ID" version="3.0">