HTTP状态404 Tomcat 8

时间:2016-08-28 15:59:22

标签: jsf tomcat web.xml

服务器正常启动,但是当我在服务器上运行我的项目时,它会显示以下错误:

  

Etat HTTP 404 - /gestionParc/faces/login.xhtml类型Rapport d'état   message /gestionParc/faces/login.xhtml description La ressource   要求尽可能的。 Apache Tomcat / 8.0.36

以下是web.xml文件:

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="http://xmlns.jcp.org/xml/ns/javaee"
    xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
    http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" id="WebApp_ID"
    version="3.1" metadata-complete="true">
    <display-name>gestionParc</display-name>
    <absolute-ordering></absolute-ordering>
    <context-param>
        <param-name>primefaces.THEME</param-name>
        <param-value>south-street</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>

    <context-param>
        <description>State saving method: 'client' or
            'server' (=default). See JSF Specification 2.5.2
        </description>
        <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
        <param-value>client</param-value>
    </context-param>

    <context-param>
        <param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
        <param-value>resources.application</param-value>
    </context-param>

    <listener>
        <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
    </listener>
</web-app>

我试图用Tomcat 7运行它也不行。

有人能帮助我吗?

1 个答案:

答案 0 :(得分:0)

您的login.xhtml文件位于何处。它应直接出现在您的应用程序Web内容下,即与您的WEB-INF文件夹相同的级别。