jsf - IntelliJ project errors "/hello.xhtml Not Found in ExternalContext as a Resource" -
my web.xml contains
<welcome-file-list> <welcome-file>faces/hello.xhtml</welcome-file> </welcome-file-list> <!-- jsf mapping --> <servlet> <servlet-name>faces servlet</servlet-name> <servlet-class>javax.faces.webapp.facesservlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>faces servlet</servlet-name> <url-pattern>/faces/*</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>faces servlet</servlet-name> <url-pattern>*.jsf</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>faces servlet</servlet-name> <url-pattern>*.faces</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>faces servlet</servlet-name> <url-pattern>*.xhtml</url-pattern> </servlet-mapping>
directory structure is
-web ---web-inf faces-config.xml web.xml ---hello.xhtml
i know there many questions on stackoverflow didn't me. doing wrong?
the problem intellij idea configured non-existed folder web resources. project structure -> facets -> web, changed web resources directory path ti actual web folder. resolved issue.
Comments
Post a Comment