Hi Benson,

All the Jetty related stuff of CXF are in the cxf-rt-transports-http-jetty module. You can get the serverEngine which wraps the Jetty instance from the JettyHttpTransportFactory.

You can use the below codes to get the serverEngine.

       Bus bus =  BusFactory.getDefaultBus();
DestinationFactoryManager dfm = bus.getExtension(DestinationFactoryManager.class); JettyHttpTransportFactory df = (JettyHttpTransportFactory) dfm.getDestinationFactory("http://cxf.apache.org/transports/http/configuration";);
      ServerEngine engine= df.getEngine();

The you just need to extends JettyHTTPHandler to deal with the static content directory, and add it into the engine by call addServant(URL url, JettyHTTPHandler handler). You can find the detail information about the ServerEngine and JettyHTTPHandler from this directory

https://svn.apache.org/repos/asf/incubator/cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty

Enjoy hacking the code !

Willem.


Benson Margulies wrote:
Could someone reveal how to ask the default bus for the running Jetty
instance? I want to add a static content directory for it to handle.


Reply via email to