Apache 在J2EE应用程序中,URL未重定向到404页
例如,如果我弄乱了URL中的文件名,它不会重定向到404页面Apache 在J2EE应用程序中,URL未重定向到404页,apache,jakarta-ee,http-status-code-404,Apache,Jakarta Ee,Http Status Code 404,例如,如果我弄乱了URL中的文件名,它不会重定向到404页面 http://10.2.3.22/xyz/404ewewqewqe.html - This url does not work http://10.2.3.22/xyz/404, These 3 urls works fine http://10.2.3.22/xyz/404ewqewqe,http://10.2.3.22/xyeewewqeweollows - 在Apache http
http://10.2.3.22/xyz/404ewewqewqe.html - This url does not work
http://10.2.3.22/xyz/404, These 3 urls works fine
http://10.2.3.22/xyz/404ewqewqe,http://10.2.3.22/xyeewewqeweollows -
在Apache httpd文件中,我有以下条目:
错误文档404/404.html
非常感谢您的帮助或指点我不确定是否理解您的问题,但为什么不使用Web.xml:
<error-page>
<exception-type>404</exception-type>
<location>/404error.html</location>
</error-page>
404
/404error.html
请注意servlet版本:
我使用:
<error-page>
<exception-type>com.sun.faces.context.FacesFileNotFoundException</exception-type>
<location>/app/error.xhtml</location>
</error-page>
com.sun.faces.context.FacesFileNotFoundException
/app/error.xhtml
我希望这能对您有所帮助。此设置的配置方式使我们无法将其移动到web.xml。您是否发现处理此行为的Apache错误文档配置有任何问题。语法简单且似乎正确。。这不是一个正确的问题吗?