I'm using Karaf 2.2.2 and with Pax Web 1.0.4. My application includes several WAB bundles.
When the OSGI container is starting up, and you attempt access the application too soon, you get a Jetty 500 error page with a ugly stack trace. Then if you try again after everything is started it works fine. I really don't want customers to see that stack trace while the application is loading. Is it possible to disable Jetty stack traces?
In order to get around this temporarily hacked the code HttpServiceContext to the following:
ErrorPageErrorHandler errorHandler = new ErrorPageErrorHandler();
setErrorHandler( errorHandler );
This works, but it would be nice if there was a cleaner way.
Actually after thinking about this a bit longer and taking a look at the "best practices" here
I think it's best to register a special ErrorPage for this.
That's why I won't fix this for 2.0.0
if you think this is a reasonable solution please mark this issue as won't fix and fix version (non fixable) thanks
It's possible to provide a error handler bean to control that:
However, it requires for the user to register its own bundle.
I propose to add a flag in org.ops4j.pax.web.cfg configuration (stacktrace.disabled for instance) that "inject" a Pax Web error handler if true.
I already have the change ready for 7.3.x branch. I’m preparing both 7.2.11 and 7.3.4 releases (even if I’m pretty busy here at ApacheCon 😉 ).
Please excuse my eagerness .
I added a property, but for the record, it’s possible to disable stack trace with jetty configuration like this:
<Call name="setShowStacks"> <!-- Here -->