我正在使用@ConversationScoped 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 参数传递给了错误页面,而这些错误页面也因为找不到对话而失败,这将它们带到了默认的异常页面。
这个问题的最佳解决方案是什么?创建过滤器、自定义处理程序等?