我怎样才能抓住一个
com.sun.faces.context.FacesFileNotFoundException
在 Java EE Web 应用程序中?
我尝试在 web.xml 文件中添加以下行,但没有成功:
...
<error-page>
<error-code>404</error-code>
<location>/404.jsf</location>
</error-page>
<error-page>
<error-code>500</error-code>
<location>/404.jsf</location>
</error-page>
<error-page>
<exception-type>FacesFileNotFoundException</exception-type>
<location>/404.jsf</location>
</error-page>
<error-page>
<exception-type>FileNotFoundException</exception-type>
<location>/404.jsf</location>
</error-page>
<error-page>
<exception-type>FailingHttpStatusCodeException</exception-type>
<location>/404.jsf</location>
</error-page>
</web-app>