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: [email protected] > 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); > > > > > > > >
