Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] ErrorHandler fallback from application to server


There is a fallback from a context error handler to the server error handler.  However, I see that the EE8 start is always setting an error handler if one is not already set.   You can just set the same error handler on both the server and context (although I do see an issue with stop/start cycles).

Experiment with this approach and then open an issue with any problems you encounter.



On Mon, 27 Oct 2025 at 03:26, Tommy Becker via jetty-users <jetty-users@xxxxxxxxxxx> wrote:
I’m migrating from Jetty 9 to 12.1 and had a question about the intended ErrorHandler behavior. I have a custom handler that I want to be used for all contexts (and no context) on the server, and I’m trying to avoid having 2 different implementations of it for the server and my EE8 applications.  Is there supposed to be some sort of fallback behavior wherein if a context does not have an ErrorHandler set it falls back to the server level one? The code in ErrorHandler.getErrorHandler() looks like it tries to do this but I couldn’t get it to work. Thanks!
_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/jetty-users


--

Back to the top