|[jetty-users] Question about ErrorHandler|
Hello all,I am using an embedded Jetty 10.0.7 server and want to implement an ErrorHandler at the ServletContext level. The idea is to implement the ErrorHandler#handle method by forwarding it to the servlet instance. My application has one single Servlet instance that forwards requests to specialized local handlers (based on application level path mappings) and I want to forward error handling to these same local scopes.
Is there a way to get the servlet instance from the parameters passed to the ErrorHandler#handle method? Or does the ErrorHandler provide any other means of getting that reference?
I can get the ServletContext from the request but I am not aware of any method to get a reference to the Servlet instance. I could add that as a request attribute inside the service method but that just feels backwards. I am probably going at this from the wrong end so if anyone has suggestions that would be great.
Kind regards, Silvio
Back to the top