I have read from http://www.orbeon.com/ops/doc/reference-error-pipeline that it is possible for a developer to display a different error page instead of the default error page. Instead of going through the error.xpl pipeline for exception handling, is there any other way I can display the exception in a custom error page? Our app would like to display all exceptions in this custom error page for consistency, and also that the exception is easy to read and no stack traces are shown to the user. How could this be achieved?
-- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
In response to the first message, I would like to know if it's possible to bypass the error pipeline and let the exception propogate up to the error handler declared in web.xml? This is what we would like to achieve, else we will have to maintain two redirections: one in web.xml and the other in an orbeon error pipeline - it would be best if we could avoid this.
-- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
In reply to this post by achai277
If you are use Apache (certainly Apache2) to front Tomcat, you can have
a user friendly error page come up instead of the error page. This is not very granular - for example, if the response is an error 504, you can redirect to your own 504 page, but you don't have a lot of detail to give the user. This is useful because in production you have Apache and hide the OPS details, and in development you do without Apache and then you see all the details (and you don't need to change anything else). Hope that helps On May 8, 2006, at 2:24 AM, [hidden email] wrote: > I have read from > http://www.orbeon.com/ops/doc/reference-error-pipeline that it is > possible for a developer to display a different error page instead of > the default error page. Instead of going through the error.xpl > pipeline for exception handling, is there any other way I can display > the exception in a custom error page? Our app would like to display > all exceptions in this custom error page for consistency, and also > that the exception is easy to read and no stack traces are shown to > the user. How could this be achieved? > > > -- > You receive this message as a subscriber of the > [hidden email] mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > ObjectWeb mailing lists service home page: http://www.objectweb.org/wws -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Thanks for the advice. Our setup consists of an error handler declared in web.xml, which will display a custom error page with the message from the thrown exception. Is it possible to bypass the error pipeline and let the exception propograte up to the error handler declared in web.xml? Full exception stack trace will be logged in a log file hidden from user view. Aaron
Discover fun and games at XtraMSN Kids! -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Administrator
|
In reply to this post by achai277
Unless I am mistaken, the Servlet API tells you that either:
1. You throw an exception (ServletException or IOException or RuntimeException) from your servlet. 2. You call sendError() with an error message. Both cases can be caught from error pages set in web.xml. OPS will run the custom error pipeline if it exists and otherwise send the exception directly to the client. When that happens, a SC_INTERNAL_SERVER_ERROR (code 500) is set on the response, assuming the response has not yet been "committed" as per the Servlet spec. So you should be able to catch code 500 from your servlet API. The exception will however not be propagated, but note that OPS will log the exception to its log file. If that doesn't work, try, in your web.xml, under ops-main-servlet, to comment out these lines: <init-param> <param-name>oxf.error-processor.name</param-name> <param-value>{http://www.orbeon.com/oxf/processors}pipeline</param-value> </init-param> <init-param> <param-name>oxf.error-processor.input.config</param-name> <param-value>oxf:/config/error.xpl</param-value> </init-param> This will disable the custom error processor. -Erik [hidden email] wrote: > In response to the first message, I would like to know if it's > possible to bypass the error pipeline and let the exception > propogate up to the error handler declared in web.xml? This is what > we would like to achieve, else we will have to maintain two > redirections: one in web.xml and the other in an orbeon error > pipeline - it would be best if we could avoid this. -- Orbeon - XForms Everywhere: http://www.orbeon.com/blog/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Free forum by Nabble | Edit this page |