Description
We are using cxf on embedded jetty and since 3.6.x we have seen a warning log coming:
ContextHandler - Unimplemented getRequestCharacterEncoding() - use org.eclipse.jetty.servlet.ServletContextHandler
This comes from "ContextHandler.StaticContext" in jetty-server (10.x and 11.x)
As the message suggest it needs to be ServletContexHandler (sitting in jetty-servlet).
Took a look around in the code and found that the ContextHandler is created in:
JettyHTTPHandler#createContextHandler and I find no way to control what kind of context handler is created here. But maybe I missed something. Or something is wrong in our server setup.
Server setup code (also tried a few permutations of this w/o success):
public static void main(String[] args) { LogUtils.setLoggerClass(Slf4jLogger.class); Server s2 = startCxfServer(4712); System.out.println("Server started"); } private static Server startCxfServer(int port) { JAXRSServerFactoryBean sf = new JAXRSServerFactoryBean(); sf.setResourceClasses(MyServiceApi.class); sf.setResourceProvider(MyServiceApi.class, new SingletonResourceProvider(new MyService())); sf.setAddress("http://0.0.0.0:"+port); return sf.create(); }
Attachments
Issue Links
- links to