Hi Benson,
It's my fault that I missed something about getting the destination from the
transport factory.
It is JettyHTTPTransportFactory and not JettyHttpTransportFactory
The code should be
Bus bus = BusFactory.getDefaultBus();
DestinationFactoryManager dfm =
bus.getExtension(DestinationFactoryManager.class);
JettyHTTPTransportFactory df = (JettyHTTPTransportFactory)
dfm.getDestinationFactory("http://cxf.apache.org/transports/http/configuration");
// get the the destionation from the transport factory by the address
EndpointInfo epi = new EndpointInfo();
epi.setAddress("you endpoint address");
JettyHTTPDestination destination = df.getDestination(epi);
ServerEngine engine= destination.getEngine();
Willem.
-----Original Message-----
From: Benson Margulies [mailto:[EMAIL PROTECTED]
Sent: Sat 7/14/2007 2:42
To: [email protected]
Subject: RE: Getting the HTTP server off the bus
Willem,
In 2.0, there is no JettyHttpTransportFactory.
There is a JettyHTTPTransportFactory.
But it has no getEngine().
?
> -----Original Message-----
> From: Willem Jiang [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, July 11, 2007 10:35 PM
> To: [email protected]
> Subject: Re: Getting the HTTP server off the bus
>
> 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/configu
ra
> tion");
> 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.
> >
> >
> >
> >
> >
> >
> >