Community
Participate
Working Groups
It is currently not trivial to customize the error handling for the HttpServiceServlet hosted by jetty-osgi.
The goal of this enhancement is to support the ability to have an HttpServlet handle the errors or to user jetty's ErrorPageErrorHandler's API. A simple static method would be used to set the servlet or to access the ErrorPageErrorHandler.
The suggested API is a choice of - an HttpServlet that is almost agnostic of any jetty internal APIs: org.eclipse.jetty.osgi.httpservice.HttpServiceErrorHandlerHelper(HttpServlet errorHandlerServlet) And for example to read the error code: int errorCode = httpServletRequest.getAttribute(org.eclipse.jetty.server.Dispatcher.ERROR_STATUS_CODE); - Direct access to the ErrorPageErrorHandler: org.eclipse.jetty.osgi.httpservice.HttpServiceErrorPageErrorHandler.getInstance()
Thanks Hugues for fixing this. This will be a great addition.