Re: pax web default and error handler override

2018-02-09 Thread Maurice Betzel
After replacing the OsgiServletRegisterer with : the servletEvent gets hit in Pax Web HttpServiceStartet. Karaf reports: karaf@root()> http:list ID │ Servlet │ Servlet-Name│ S

Re: pax web default and error handler override

2018-02-08 Thread Grzegorz Grzybek
Maurice - you probably can (I didn't try). I'm not sure what OsgiServletRegisterer does, but with pax-http-whiteboard, you can just register HttpServlet as osgi service and have it picked up and registered in http service. I recommend you try the samples in https://github.com/ops4j/org.ops4j.pax.we

Re: pax web default and error handler override

2018-02-07 Thread Maurice Betzel
Question, can i register a camel servlet on the pax web blueprint services? Now i am using: Code hier eingeben... http://camel.apache.org/schema/blueprint";> -- -- -- OPS4J - http://www.ops4j.org - ops4j@googlegroups.com --- Yo

Re: pax web default and error handler override

2018-02-06 Thread Maurice Betzel
Defaulting back to the blueprint setup, maybe i can configure costum exceptions on each registered handler / alias pair. Am Dienstag, 6. Februar 2018 14:42:06 UTC+1 schrieb Maurice Betzel: > > ...or set my error page on the ErrorPageErrorHandler? > > Am Dienstag, 6. Februar 2018 14:30:43 UTC+1 sc

Re: pax web default and error handler override

2018-02-06 Thread Maurice Betzel
...or set my error page on the ErrorPageErrorHandler? Am Dienstag, 6. Februar 2018 14:30:43 UTC+1 schrieb Maurice Betzel: > > How do i remove the ErrorPageErrorHandler from my default context? > -- -- -- OPS4J - http://www.ops4j.org - ops4j@googlegroups.com --- You received th

Re: pax web default and error handler override

2018-02-06 Thread Maurice Betzel
How do i remove the ErrorPageErrorHandler from my default context? -- -- -- OPS4J - http://www.ops4j.org - ops4j@googlegroups.com --- You received this message because you are subscribed to the Google Groups "OPS4J" group. To unsubscribe from this group and stop receiving emai

Re: pax web default and error handler override

2018-02-06 Thread Maurice Betzel
I do know about debugging and hash codes :), following the Jetty docs i need to set a ErrorHandler on the Server context: If no error page mapping is defined, or if the error page resource itself has an error, then the error page will be generated by an instance of ErrorHandler configured eithe

Re: pax web default and error handler override

2018-02-06 Thread Grzegorz Grzybek
2018-02-06 11:58 GMT+01:00 Maurice Betzel : > I have added my own error handler with addBean and i can see it on the > Server object, but in the Jetty Response object on method sendError the > ErrorHandler.getErrorHandler returns the Jetty ErrorPageErrorHandler. I am > missing something more... >

Re: pax web default and error handler override

2018-02-06 Thread Maurice Betzel
I have added my own error handler with addBean and i can see it on the Server object, but in the Jetty Response object on method sendError the ErrorHandler.getErrorHandler returns the Jetty ErrorPageErrorHandler. I am missing something more... -- -- -- OPS4J - http://www.ops4j

Re: pax web default and error handler override

2018-02-06 Thread Maurice Betzel
Adding my own error handler... Am Dienstag, 6. Februar 2018 11:33:24 UTC+1 schrieb Grzegorz Grzybek: > > I think there's separate default handler and error handler. > In case you have servlets, servlet may provide error pages definitions for > given exceptions and/or HTTP error codes. > > regards

Re: pax web default and error handler override

2018-02-06 Thread Grzegorz Grzybek
I think there's separate default handler and error handler. In case you have servlets, servlet may provide error pages definitions for given exceptions and/or HTTP error codes. regards Grzegorz 2018-02-06 11:28 GMT+01:00 Maurice Betzel : > I am hitting the Jetty > > org.eclipse.jetty.server.hand

Re: pax web default and error handler override

2018-02-06 Thread Maurice Betzel
I am hitting the Jetty org.eclipse.jetty.server.handler.ErrorHandler Am Dienstag, 6. Februar 2018 11:23:16 UTC+1 schrieb Maurice Betzel: > > If you take a look at > > org.eclipse.jetty.server.Response method sendError > > > > you will see Jetty is returning the default error web page if no error

Re: pax web default and error handler override

2018-02-06 Thread Maurice Betzel
If you take a look at org.eclipse.jetty.server.Response method sendError you will see Jetty is returning the default error web page if no error handler is set :( . For my understanding it should pick up my default handler for producing the page. Can i set the error handler to point to my defa

Re: pax web default and error handler override

2018-02-06 Thread Grzegorz Grzybek
And the error handler is NOT the one you wanted to set? I don't see any custom ErrorHandler in your jetty.xml... ~Grzegorz 2018-02-06 11:03 GMT+01:00 Maurice Betzel : > Camel is calling the method after not finding any matching consumer: > > response.sendError(HttpServletResponse.SC_NOT_FOUND);

Re: pax web default and error handler override

2018-02-06 Thread Maurice Betzel
Camel is calling the method after not finding any matching consumer: response.sendError(HttpServletResponse.SC_NOT_FOUND); and just returns the thread, meaning the Response produced by Jetty has the default Jetty exception page set somewhere. Am Dienstag, 6. Februar 2018 10:49:22 UTC+1 schrieb

Re: pax web default and error handler override

2018-02-06 Thread Grzegorz Grzybek
2018-02-06 10:49 GMT+01:00 Maurice Betzel : > I am getting to the point here :), in the > > org.eclipse.jetty.servlet.ServletHolder.class > > > i am hitting method handle on line 571 calling the > CamelHttpTransportServlet: > > servlet.service(request, response); > > > Before the call the request

Re: pax web default and error handler override

2018-02-06 Thread Maurice Betzel
I am getting to the point here :), in the org.eclipse.jetty.servlet.ServletHolder.class i am hitting method handle on line 571 calling the CamelHttpTransportServlet: servlet.service(request, response); Before the call the request reports not handled and the response object does not have a w

Re: pax web default and error handler override

2018-02-06 Thread Grzegorz Grzybek
Hello Hmm, I see your case is quite complex - is there a chance you prepare integration test in pax-web-itests/pax-web-itests-container/pax-web-itests-container-jetty? I'd have to try to reproduce your issue, but I have to know what other web bundles / wars you have installed - maybe you also hav

Re: pax web default and error handler override

2018-02-06 Thread Maurice Betzel
No, it did not. Jetty is producing the response using the default Jetty handler. Am Dienstag, 6. Februar 2018 09:49:55 UTC+1 schrieb Maurice Betzel: > > My default handler gets hit on > https://somehost/api/rest/existingcontext/nonexistingcontext, but reports > that the base request was handled

Re: pax web default and error handler override

2018-02-06 Thread Maurice Betzel
My default handler gets hit on https://somehost/api/rest/existingcontext/nonexistingcontext, but reports that the base request was handled and the response was committed. Did the Camel servlet handle the error before my default handler? -- -- -- OPS4J - http://www.ops4j.org -

Re: pax web default and error handler override

2018-02-06 Thread Maurice Betzel
Following sutuation, if i add my default handler it gets picked up until the alias of an other context takes over. Then the default handler of Jetty takes over again e.g. https://somehost/nonexistingcontext returns my default handler and https://somehost/api/rest/existingcontext/nonexistingcont

Re: pax web default and error handler override

2018-02-05 Thread Maurice Betzel
Revoking this posting, in a context higherup in the tree Jetty serves the Jetty default again. I need to remove this default jetty handler... Am Montag, 5. Februar 2018 13:58:33 UTC+1 schrieb Maurice Betzel: > > Its working, i have copied the default handler from Jetty and it gets hit > by the d

Re: pax web default and error handler override

2018-02-05 Thread Maurice Betzel
Its working, i have copied the default handler from Jetty and it gets hit by the debugger. Now i have to change the response, favicon etc... -- -- -- OPS4J - http://www.ops4j.org - ops4j@googlegroups.com --- You received this message because you are subscribed to the Google Gr

Re: pax web default and error handler override

2018-02-05 Thread Grzegorz Grzybek
Good luck! ;) regards Grzegorz Grzybek 2018-02-05 11:08 GMT+01:00 Maurice Betzel : > I did get hold of the WebContainer, but the HttpServiceStarted object was > not reachable because of package encapsulation. This is the object that has > a reference to the Jetty Server object containing the nee

Re: pax web default and error handler override

2018-02-05 Thread Maurice Betzel
I did get hold of the WebContainer, but the HttpServiceStarted object was not reachable because of package encapsulation. This is the object that has a reference to the Jetty Server object containing the needed methods. Will try the fragment solution now, there is a example in the samples folder

Re: pax web default and error handler override

2018-02-05 Thread Grzegorz Grzybek
Hello The only thing that I can think of (I didn't try it and I don't know what you can do with jetty.xml without checking) is to: - add a handler inside etc/jetty.xml using element for respective - put this handler into a bundle *that you can install as fragment bundle of pax-web-jetty* - but

Re: pax web default and error handler override

2018-02-05 Thread Maurice Betzel
Moin Grzegor, i did get the default handler (aka "/") working by blueprint (from the pax web samples dir), but this does not cover other http contexts further up in the context tree. I have some Camel routes running there and i would like to have one default exception and error page for all con

Re: pax web default and error handler override

2018-02-04 Thread Grzegorz Grzybek
Hello "The handler" of single Jetty server inside pax-web is org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection - which is kind of "entry point" from Jetty to pax-web. You generally should not change it. In pax-web, the server is org.ops4j.pax.web.service.jetty.internal.JettySer