2013-07-30 3 views
9

응용 프로그램을 시작하는 동안이 오류가 발생합니다./faces/index.xhtml GlassFish의 리소스로 ExternalContext에서 찾을 수 없음

com.sun.faces.context.FacesFileNotFoundException :

<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="3.0" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"> 
    <context-param> 
     <param-name>javax.faces.PROJECT_STAGE</param-name> 
     <param-value>Production</param-value> 
    </context-param> 
    <context-param> 
     <param-name>primefaces.THEME</param-name> 
     <param-value>#{themeSwitcherBean.theme}</param-value> 
    </context-param> 
    <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> 
    <session-config> 
     <session-timeout>30</session-timeout> 
    </session-config> 
    <welcome-file-list> 
     <welcome-file>faces/index.xhtml</welcome-file> 
    </welcome-file-list> 
</web-app> 
: /faces/index.xhtml 자원으로 ExternalContext에서 발견되지 않음

이 web.xml 파일의 내용입니다

답변

2

web.xml에 환영/색인 파일로 선언 한 index.xhtml이 없습니다.

<welcome-file-list> 
     <welcome-file>faces/index.xhtml</welcome-file> 
    </welcome-file-list> 
+0

JSF2.2에서 작동하지 않습니다. – cheloncio