问题eclipse找不到externalcontext作为资源

xqnpmsa8  于 2021-06-30  发布在  Java
关注(0)|答案(1)|浏览(347)

我不得不从intellij切换到eclipse(luna版本),不得不将旧的projet从java1.6升级到1.8,还添加了maven来处理依赖关系。。。当我在tomcat(8.0.53)下的intellij上运行这个项目时,我一点问题都没有。一切进展顺利。当我从eclipse启动应用程序时。。。我面临这个问题:
严重:异常处理错误页[errorcode=500,location=/error500.faces]java.io.filenotfoundexception:/myproject/pages/template\u nobuttons.xhtml在org.apache.myfaces.view.facelets.impl.defaultfaceletfactory.resolveurl(defaultfaceletfactory)的externalcontext中找不到资源。java:300)在org.apache.myfaces.view.facelets.impl.defaultfacelet.getrelativepath(defaultfacelet。java:468)在org.apache.myfaces.view.facelets.impl.defaultfacelet.include(defaultfacelet。java:550)位于org.apache.myfaces.view.facelets.impl.defaultfaceletcontext.includefacelet(defaultfaceletcontext)。java:240)在org.apache.myfaces.view.facelets.tag.ui.compositionhandler.apply(compositionhandler。java:150)在org.apache.myfaces.view.facelets.compiler.namespacehandler.apply(namespacehandler。java:59)在org.apache.myfaces.view.facelets.compiler.encodinghandler.apply(encodinghandler。java:48)在org.apache.myfaces.view.facelets.impl.defaultfacelet.apply(defaultfacelet。java:187)在org.apache.myfaces.view.facelets.faceletviewdeclarationlanguage.buildview(faceletviewdeclarationlanguage。java:483)在org.apache.myfaces.lifecycle.renderresponseexecutor.execute(renderresponseexecutor。java:79)在org.apache.myfaces.lifecycle.lifecycleimpl.render(lifecycleimpl。java:266)在javax.faces.webapp.facesservlet.service(facesservlet。java:206)位于org.apache.catalina.core.applicationfilterchain.internaldofilter(applicationfilterchain)。java:292)在org.apache.catalina.core.applicationfilterchain.dofilter(applicationfilterchain。java:207)在org.apache.catalina.core.applicationdispatcher.invoke(applicationdispatcher。java:716)在org.apache.catalina.core.applicationdispatcher.processrequest(applicationdispatcher。java:468)位于org.apache.catalina.core.applicationdispatcher.doforward(applicationdispatcher.com)。java:391)在org.apache.catalina.core.applicationdispatcher.forward(applicationdispatcher。java:318)在org.apache.catalina.core.standardhostvalve.custom(standardhostvalve。java:442)在org.apache.catalina.core.standardhostvalve.status(standardhostvalve。java:301)在org.apache.catalina.core.standardhostvalve.throwable(standardhostvalve。java:396)在org.apache.catalina.core.standardhostvalve.invoke(standardhostvalve。java:176)在org.apache.catalina.valves.errorreportvalve.invoke(errorreportvalve。java:80)在org.apache.catalina.valves.abstractaccesslogvalve.invoke(abstractaccesslogvalve。java:620)在org.apache.catalina.core.standardenginevalve.invoke(standardenginevalve。java:88)在org.apache.catalina.connector.coyoteadapter.service(coyoteadapter。java:502)在org.apache.coyote.http11.abstracthttp11processor.process(抽象http11processor。java:1152)在org.apache.coyote.abstractprotocol$abstractconnectionhandler.process(abstractprotocol。java:684)位于org.apache.tomcat.util.net.nioendpoint$socketprocessor.dorun(nioendpoint)。java:1539)在org.apache.tomcat.util.net.nioendpoint$socketprocessor.run(nioendpoint)。java:1495)位于java.util.concurrent.threadpoolexecutor.runworker(threadpoolexecutor。java:1149)在java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor。java:624)在org.apache.tomcat.util.threads.taskthread$wrappingrunnable.run(taskthread。java:61)在java.lang.thread.run(线程。java:748)
我对eclipse不是特别熟悉,在做了一些研究之后,我已经尝试了一些事情。但似乎什么都没用。。。嗅探:(
wierd是指当我从eclipse创建一个war文件并从部署root.war的tomcat示例手动运行它时。。。一切都很顺利。
所以我假设当我从eclipse启动tomcat服务器时,它应该是eclipse配置中的某个东西。。。如有任何意见,我们将不胜感激
这是我的webcontent文件夹webcontent的屏幕
我已经把这个放在我的web.xml里了

<context-param>
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
<param-value>.xhtml</param-value>
</context-param>
5kgi1eie

5kgi1eie1#

您是否尝试过用maven目标“clean install”重建项目,以我的经验来看,这样的错误在重建后常常会消失。

相关问题