我正在使用JSF2和Glassfish 3.0.
我有一个非常简单的应用程序,我正在尝试设置一些默认错误页面404
和500
错误.
这是WEB.XML
部分:
<error-page>
<exception-type>404</exception-type>
<location>/error.xhtml</location>
</error-page>
<error-page>
<exception-type>500</exception-type>
<location>/error.xhtml</location>
</error-page>
Run Code Online (Sandbox Code Playgroud)
即使error.xhtml存在,在浏览器中我仍然得到标准HTTP Status 404 -
警告.