-
1. Re: Custom error pages in Seam 2
joaobmonteiro Oct 30, 2008 12:37 AM (in response to kesson)Hi Eugene,
Please, check if you have a default redirect for Exception. Something like:
<exception> <redirect view-id="/error.xhtml"> <message severity="WARN">#{org.jboss.seam.exception.message}</message> </redirect> </exception>
I suspect that you are getting an untreated exception.
-
2. Re: Custom error pages in Seam 2
kesson Oct 30, 2008 8:51 AM (in response to kesson)Hi, Joao,
I had thought so, but it is not the case. We are catching even most general exceptions, and we could see from logs that exeption is caught exactly in place we expected it to be, but redirect doesn't occur. By the way, in case of NotLoggedInException, redirect works fine. I have been explained, that the problem is that the system cannot perform redirection, once http headers were written already. And that is what I want to prevent.
We have default redirect for Exception, that you have mentioned here:<exception> <redirect view-id="/error.xhtml"> <message>Unexpected error, please try again</message> </redirect> </exception>
Well, do you have some other idea?
Thanks!
-
3. Re: Custom error pages in Seam 2
dan.j.allen Nov 5, 2008 8:38 AM (in response to kesson)In all likelyhood, the error page that you are seeing in the Facelets development page. If you want Seam to be able to catch all exceptions, you should disable Facelets development mode in web.xml and disable Seam debug mode as well.
<context-param> <param-name>facelets.DEVELOPMENT</param-name> <param-value>false</param-value> </context-param>
In rare cases, even Facelets/JSF cannot catch the error page. In those cases, you can resort to the exception handling facility in web.xml.
-
4. Re: Custom error pages in Seam 2
kesson Nov 6, 2008 10:51 AM (in response to kesson)Hey.
Many thanks, it seems to have helped (I've just disabled Facelets development mode as you suggested). I am trying to see how the system behaves in case of various exceptions, but the direction is clear now. Thanks again!