我正在使用SEAM 2.3.0(JBoss 7.1),试图实现以下导航逻辑:
对于我不会在任何页面规则中捕获的每个* .xhtml,转到404.xhtml错误页面。
这样的事情:
<page view-id="/*.xhtml">
<navigation>
<redirect view-id="/404.xhtml" />
</navigation>
</page>
但它不能正常工作
对于所有具有错误书写扩展名的网址,将显示404页面,原因如下:
<error-page>
<error-code>404</error-code>
<location>/404.xhtml</location>
</error-page>
在web.xml中。
提前致谢
答案 0 :(得分:1)
我找到了答案。
<error-page>
<exception-type>java.lang.Throwable</exception-type>
<location>/404.xhtml</location>
</error-page>