Hi Beanson, My bad to take the JettyHTTPHandler as ContextHandler.
I just checked the Jetty's handler api, and I didn't find a way to get the parent handler form a childer handler. Maybe you can find the Context handler by looking up the context path from server, or we can add the getContextHandler method in the JettyHTTPServerEngine. Willem. -----Original Message----- From: Benson Margulies [mailto:[EMAIL PROTECTED] Sent: Mon 7/16/2007 22:53 To: cxf-user@incubator.apache.org Subject: RE: Getting the HTTP server off the bus Willem, When I call getServant, I get back the JettyHTTPHandler. Which, interestingly enough, will cheerfully return the Jetty Server object which I was asking for in the first place. The ContextHandler in which the JettyHTTPHandler lives is somewhat obscurely connected, I haven't found the trail of breadcrumbs for it yet, but I'm working on it. --benson > -----Original Message----- > From: Willem Jiang [mailto:[EMAIL PROTECTED] > Sent: Monday, July 16, 2007 4:44 AM > To: cxf-user@incubator.apache.org > Subject: Re: Getting the HTTP server off the bus > > Benson, > > I just noticed that you can get the context handler by the below code > when you get the service engine. > > ... > > JettyHTTPDestination destination = > (JettyHTTPDestination)df.getDestination(epi); > ServerEngine engine= destination.getEngine(); > ContextHandler context = (ContextHandler) engine.getServant(new > URL(address)); > ... > > And you can use this context to add the static resource handler. > > Willem. > > Benson Margulies wrote: > > Before I finish the story I started, I see that I could get what I want > > around here by making a mutant copy of JettyHTTPServerEngine and using > > it by imposing my own subclass of JettyHTTPServerEngineFactory. So I'm > > looking around to see where I can configure THAT trick. > > > > > > In XFire, I made a variation on XFireHttpServer in which I could have > > the following ... > > > > ResourceHandler rh = new ResourceHandler(); > > rh.setDirAllowed(true); > > context.addHandler(rh); > > context.setResourceBase(staticContentDirectory); > > > > > > > >