Servlets 未显示自定义404错误页面

Servlets 未显示自定义404错误页面,servlets,web.xml,custom-error-pages,Servlets,Web.xml,Custom Error Pages,我在web.xml中配置了以下内容 <error-page> <error-code>404</error-code> <location>/errors/404.html</location> </error-page> 404 /错误/404.html 我已经创建了一个自定义的400.html页面 当找不到任何资源时,我会看到一个写着“未找到”的纯白色页面,但我看不到我的自定义错误页

我在web.xml中配置了以下内容

<error-page>
        <error-code>404</error-code>
        <location>/errors/404.html</location>
</error-page>

404
/错误/404.html
我已经创建了一个自定义的400.html页面

当找不到任何资源时,我会看到一个写着“未找到”的纯白色页面,但我看不到我的自定义错误页面

我在日志中也看到了以下内容

警告[javax.enterprise.resource.webcontainer.jsf.application] (默认任务-29)JSF1064:无法找到或服务资源, /harry.jsf


我刚发现我错过了那辆车 我添加了以下映射,现在它正在工作

<servlet-mapping>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>*.xhtml</url-pattern>
</servlet-mapping>

Facesservlet
*.xhtml

谢谢你指出,我已经更正了。这只是页面的名称。错误代码参数是400,这是正确的。没有从编辑器粘贴的I copy。这和我想象的一样。谢谢