| Summary: | Ability to customize the ErrorHandler for the HttpService | ||
|---|---|---|---|
| Product: | [RT] Jetty | Reporter: | Hugues Malphettes <hmalphettes> |
| Component: | osgi | Assignee: | Hugues Malphettes <hmalphettes> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | holger.staudacher, jetty-inbox |
| Version: | 7.4.0 | ||
| Target Milestone: | 7.4.x | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
|
Description
Hugues Malphettes
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. |