【发布时间】:2012-10-10 09:45:22
【问题描述】:
我正在使用@ConvertationScoped bean,我想为您手动更改 cid 参数的情况创建一个很好的错误页面。
<error-page>
<exception-type>javax.enterprise.context.NonexistentConversationException</exception-type>
<location>/nonExistentConversation.xhtml</location>
</error-page>
<error-page>
<exception-type>org.jboss.weld.context.NonexistentConversationException</exception-type>
<location>/nonExistentConversation.xhtml</location>
</error-page>
问题是cid参数传给了错误页面,而这些错误页面也因为找不到对话而失败,导致进入默认异常页面。
这个问题的最佳解决方案是什么?创建过滤器、自定义处理程序等?
【问题讨论】: