Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-users] Error handling of ServletException

I have a simple servlet that generates some HTML output, flushes response.getWriter() (response is committed) and then throws a ServletException to simulate an error.  In this situation, Jetty 7.1 seems to eat the exception and never goes into error handling.  So, in the browser, I get the HTML before the exception and it just stops.  If I don't flush the PrintWriter, error handling works as expected.

In Jetty 5, I would get the HTML before the exception and the exception all in the same page.  Sometimes it would be ugly but, at least I still got the error back.  What is the correct way of handling a situation like this?  I prefer to get the exception back in the browser.  Can this be configured somewhere?

Thanks
Tony
 
This message (and any associated files) is intended only for the
use of the individual or entity to which it is addressed and may
contain information that is confidential, subject to copyright or
constitutes a trade secret. If you are not the intended recipient
you are hereby notified that any dissemination, copying or
distribution of this message, or files associated with this message,
is strictly prohibited. If you have received this message in error,
please notify us immediately by replying to the message and deleting
it from your computer. Messages sent to and from Stoneware, Inc.
may be monitored.


Back to the top