Return-Path: Delivered-To: apmail-incubator-cxf-user-archive@locus.apache.org Received: (qmail 6583 invoked from network); 12 Jul 2007 02:35:48 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Jul 2007 02:35:48 -0000 Received: (qmail 17392 invoked by uid 500); 12 Jul 2007 02:35:50 -0000 Delivered-To: apmail-incubator-cxf-user-archive@incubator.apache.org Received: (qmail 17344 invoked by uid 500); 12 Jul 2007 02:35:50 -0000 Mailing-List: contact cxf-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cxf-user@incubator.apache.org Delivered-To: mailing list cxf-user@incubator.apache.org Received: (qmail 17334 invoked by uid 99); 12 Jul 2007 02:35:50 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Jul 2007 19:35:50 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of ning.jiang@iona.com designates 12.170.54.180 as permitted sender) Received: from [12.170.54.180] (HELO amer-mx1.iona.com) (12.170.54.180) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Jul 2007 19:35:46 -0700 X-IronPort-AV: E=Sophos;i="4.16,529,1175486400"; d="scan'208";a="2677297" Received: from amer-ems1.ionaglobal.com ([10.65.6.25]) by amer-mx1.iona.com with ESMTP; 11 Jul 2007 22:35:25 -0400 Received: from [10.129.9.175] ([10.129.9.175]) by amer-ems1.IONAGLOBAL.COM with Microsoft SMTPSVC(6.0.3790.1830); Wed, 11 Jul 2007 22:35:22 -0400 Message-ID: <4695934B.1020502@iona.com> Date: Thu, 12 Jul 2007 10:34:51 +0800 From: Willem Jiang User-Agent: Thunderbird 1.5.0.10 (Windows/20070221) MIME-Version: 1.0 To: cxf-user@incubator.apache.org Subject: Re: Getting the HTTP server off the bus References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 12 Jul 2007 02:35:25.0139 (UTC) FILETIME=[4D374A30:01C7C42D] X-Virus-Checked: Checked by ClamAV on apache.org 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. > > > > > > >