I’m using a @ConverstationScoped bean, I want to create a nice error page for the case you change the cid parameter manually.
<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>
The problem is that the cid parameter is passed to the error pages, and these error pages are also failing because they can’t find the conversation, which brings them to the default exception page.
What is the best solution for this problem? Creating a filter, custom handlers, others?
Atm I’m using a non jsf page for my conversation error page.
I’ve got this in my web.xml:
so a page named error.html won’t go trough the Faces Servlet and the error page will be displayed iso searching a conversation with the cid in the request parameter.
The disadvantage is that you can’t do any JSF stuff in them (i18n, stack traces in dev, ..)