Yes, indeed, this is really a superior solution. It's much better than
trying to replace factories.

Now, if I only knew why the jetty FileResource constructs over a URL
instead of a pathname :-)

Thanks!

> -----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);
> >
> >
> >
> >

Reply via email to