Jsf IntelliJ项目错误“/在ExternalContext中找不到作为资源的hello.xhtml;

Jsf IntelliJ项目错误“/在ExternalContext中找不到作为资源的hello.xhtml;,jsf,intellij-idea,http-status-code-404,Jsf,Intellij Idea,Http Status Code 404,My web.xml包含 faces/hello.xhtml Facesservlet javax.faces.webapp.FacesServlet 1. Facesservlet /面孔/* Facesservlet *.jsf Facesservlet *.面孔 Facesservlet *.xhtml 目录结构是 -web ---WEB-INF faces-config.xml web.xml ---hello.xhtml 我知道在stackoverflow上有

My web.xml包含


faces/hello.xhtml
Facesservlet
javax.faces.webapp.FacesServlet
1.
Facesservlet
/面孔/*
Facesservlet
*.jsf
Facesservlet
*.面孔
Facesservlet
*.xhtml
目录结构是

-web
---WEB-INF
     faces-config.xml
     web.xml
---hello.xhtml

我知道在stackoverflow上有很多这样的问题,但它们没有帮助我。我做错了什么

问题在于IntelliJ Idea将不存在的文件夹配置为web资源。
项目结构->Facets->Web,然后我将Web资源目录路径更改为实际的Web文件夹。这解决了问题。

问题在于IntelliJ Idea将不存在的文件夹配置为web资源。
项目结构->Facets->Web,然后我将Web资源目录路径更改为实际的Web文件夹。这解决了问题。

您的hello.xhtml未位于
faces/
下,因为它的配置:
faces/hello.xhtml
将此行faces/hello.xhtml更改为hello.xhtml。我尝试了hello.xhtml,我尝试删除faces文件夹和其他组合您的hello.xhtml未按配置位于
faces/
下:
faces/hello.xhtml
将此行faces/hello.xhtml更改为hello.xhtml我尝试了hello.xhtml,我尝试了删除faces文件夹和其他组合