При попытке запустить на Tomcat страницу пишет ошибку 404 с сообщением: "The origin server did not find a current representation for the target resource or is not willing to disclose that one exists." Структура файлов:введите сюда описание изображения
Web.xml:
Код |
<?xml version="1.0" encoding="UTF-8"?><web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" version="3.1">
<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>*.xhtml</url-pattern> </servlet-mapping>
<welcome-file-list> <welcome-file>index.xhtml</welcome-file> </welcome-file-list> <context-param> <param-name>javax.faces.PROJECT_STAGE</param-name> <param-value>Development</param-value> </context-param>
|
faces-config.xml:
Код | <?xml version="1.0" encoding="UTF-8"?> <faces-config version="2.2" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_2.xsd">
<navigation-rule> <from-view-id>index.xhtml</from-view-id>
<navigation-case> <from-outcome>toMain</from-outcome> <to-view-id>main.xhtml</to-view-id> <redirect/> </navigation-case>
</navigation-rule>
<navigation-rule> <from-view-id>main.xhtml</from-view-id>
<navigation-case> <from-outcome>toIndex</from-outcome> <to-view-id>index.xhtml</to-view-id> <redirect/> </navigation-case>
</navigation-rule>
|
Что не так? |