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
  • From: Tommy Becker <Thomas.Becker@xxxxxxxxx>
  • Date: Mon, 27 Oct 2025 10:58:05 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=xperi.com; dmarc=pass action=none header.from=xperi.com; dkim=pass header.d=xperi.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=KLTWKd/+0MkA+i/RR4j4N0/ofWpt+Pr++F3TKCCJqXE=; b=bDPZA8uMOWfuUTUpJi522Hj1Tl1DnKQJ6yFRXOqi3aZU9eJnwBvVVgL8gWXOI2hg7Plq+8WbC9G5JbXeZjtm2CLgol7x1esOg0vHZ2e5FGmPyVDx42lQ6p7GAZhSdhplkjiMSEbo8qdeP9ZIOXhiMcTCH4Gpu7XXobgy8KlgO80OwxZV89Rt8WCSSv/HQX3vwu9PtxNBGkCyjsaqsFkuarNv/QEuv0R9JXSynS20M4ZD8pPCELziIShpmObK8ea+w7IlM49DUL6e456yom8Gk28aely9B4x/iqIUBKWqmUTKYYqWKv0Io55jZJDdW1ZSxGwYIXYCAQ9hGYXKiVnZwQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=e0fw6j4lcrB8rRqXeYzize8HMDaDiJzjxaaphKnMAuU3Bu2L7pQRgSDYsG9otqfyuRZUY0IhujD1WYXaj5fzmykR9o+QvFqJaYKfDstXIYBt4+qvC1VcZzXpfIkhQUTGaOgCQI9j0ilYV2dQ2Vn+r4QBWAzVEJgfUt9sTaU7colxlnBniNO1JV/IkcyCXRdeDkLFYU+RqNPNhI2sYQHY31/Gd+jbnXxT+Z8lE2DmYI7OSLHd1zTGOr+GRna+ZhsIOuQKiB1DlnCmlFSlMasRdYz9b/L07OKhYYWXKcyJTNdh+SZVyunlS13q5wqIVnuF++XqEkkUmlm328aIak2m9g==
  • Delivered-to: jetty-users@xxxxxxxxxxx
  • List-archive: <https://www.eclipse.org/mailman/private/jetty-users/>
  • List-help: <mailto:jetty-users-request@eclipse.org?subject=help>
  • List-subscribe: <https://www.eclipse.org/mailman/listinfo/jetty-users>, <mailto:jetty-users-request@eclipse.org?subject=subscribe>
  • List-unsubscribe: <https://www.eclipse.org/mailman/options/jetty-users>, <mailto:jetty-users-request@eclipse.org?subject=unsubscribe>
  • Thread-index: AQHcRpU0k9LCmAHYpUqDqLdJ0gJG/LTU3jeAgAD0c8c=
  • Thread-topic: [jetty-users] ErrorHandler fallback from application to server

Thanks for the response. Unless I’m missing something, it’s not possible to set the same handler as they are different types: org.eclipse.jetty.ee8.nested.ErrorHandler vs org.eclipse.jetty.server.handler.ErrorHandler. I see the EE10 and 11 ErrorHandlers extend the server one but the EE8 and 9 versions dont.

From: Greg Wilkins <gregw@xxxxxxxxxxx>
Date: Sunday, October 26, 2025 at 4:18 PM
To: JETTY user mailing list <jetty-users@xxxxxxxxxxx>
Cc: Tommy Becker <Thomas.Becker@xxxxxxxxx>
Subject: Re: [jetty-users] ErrorHandler fallback from application to server

You don't often get email from gregw@xxxxxxxxxxx. Learn why this is important
 

This message has originated from an External Source. Please use proper judgment and caution when opening attachments, clicking links, or responding to this email. For any questions don't hesitate to reach out to security@xxxxxxxxx



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