我正在将一个网络应用程序从 jboss 4 迁移到 jetty 8.x 版本。虽然 Jetty 服务器启动,但当我尝试访问任何 jsp 页面时,我看到了这个问题。访问jsp页面时jetty服务器抛出的日志
java.lang.UnsupportedOperationException
at javax.faces.application.Application.getELResolver(Application.java:443)
at com.sun.faces.context.FacesContextImpl.getELContext(FacesContextImpl.java:172)
at javax.faces.component.UIViewRoot.setLocale(UIViewRoot.java:900)
at com.sun.faces.application.ViewHandlerImpl.createView(ViewHandlerImpl.java:370)
at com.anm.jsf.JsfTilesViewHandlerImpl.createView(JsfTilesViewHandlerImpl.java:271)
at org.apache.myfaces.lifecycle.LifecycleImpl.restoreView(LifecycleImpl.java:132)
at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:82)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:669)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1448)
at com.homeshop18.scazle.filter.HeaderFilter.doFilter(HeaderFilter.java:66)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1428)
at org.apache.myfaces.component.html.util.MultipartFilter.doFilter(MultipartFilter.java:105)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419)
at com.anm.security.SecurityFilter.doFilter(SecurityFilter.java:186)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:455)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1075)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:384)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1009)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
at org.eclipse.jetty.server.Server.handle(Server.java:368)
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:488)
at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:932)
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:994)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:640)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:628)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
at java.lang.Thread.run(Thread.java:662)
仅供参考,我已经有jstl
, jsp-api
, jsf-api
,jsf-impl
因为依赖项和码头服务器是mvn-jetty plugin
.