I need a little help creating a catch-all error handling page in my ICEfaces application. I'd like to present a user-friendly message along with an exception stack trace.
我需要一点帮助在ICEfaces应用程序中创建一个全能错误处理页面。我想提供一个用户友好的消息以及异常堆栈跟踪。
I can redirect to an error page using the following directive in web.xml:
我可以使用web.xml中的以下指令重定向到错误页面:
<error-page>
<error-code>500</error-code>
<location>/error.xhtml</location>
</error-page>
However, I can't figure out how to get to the exception within error.xhtml. Is it stored in request
, session
, or somewhere else?
但是,我无法弄清楚如何在error.xhtml中获取异常。它是存储在请求,会话还是其他地方?
I'm using ICEfaces 1.8.0 (with Facelets) and JSF 1.2 (Sun RI). Thanks!
我正在使用ICEfaces 1.8.0(带Facelets)和JSF 1.2(Sun RI)。谢谢!
1 个解决方案
#1
Maybe this can help you:
也许这可以帮助你:
get some stack trace info into a custom tomcat error 500 page
将一些堆栈跟踪信息放入自定义tomcat错误500页
http://josephmarques.wordpress.com/2009/04/27/custom-jsf-exception-handling/
http://www.nabble.com/Exception-handling-in-JSF-td15850273.html
http://softwareengineeringsolutions.com/thoughts/frameworks/JSF.Techniques-Error.Handling.htm
#1
Maybe this can help you:
也许这可以帮助你:
get some stack trace info into a custom tomcat error 500 page
将一些堆栈跟踪信息放入自定义tomcat错误500页
http://josephmarques.wordpress.com/2009/04/27/custom-jsf-exception-handling/
http://www.nabble.com/Exception-handling-in-JSF-td15850273.html
http://softwareengineeringsolutions.com/thoughts/frameworks/JSF.Techniques-Error.Handling.htm