[ 
https://issues.apache.org/jira/browse/CXF-8894?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andriy Redko updated CXF-8894:
------------------------------
    Issue Type: Improvement  (was: Bug)

> ContextHandler - Unimplemented getRequestCharacterEncoding() - use 
> org.eclipse.jetty.servlet.ServletContextHandler
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: CXF-8894
>                 URL: https://issues.apache.org/jira/browse/CXF-8894
>             Project: CXF
>          Issue Type: Improvement
>            Reporter: Karl-Johan Karlberg
>            Priority: Major
>
> We are using cxf on embedded jetty and since 3.6.x we have seen a warning log 
> coming:
> {noformat}
> ContextHandler - Unimplemented getRequestCharacterEncoding() - use 
> org.eclipse.jetty.servlet.ServletContextHandler {noformat}
> 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):
> {code:java}
> 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();
> } {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to