ObjectWeb Consortium
Search ObjectWeb Mail Archive: 

Advanced Search - Powered by Google

Mail Archive Home | oscar List | March 2005 Index

<--  Date Index  --> <--  Thread Index  -->

Re: [oscar] Serving static files with HTTP server in Oscar

Hi Rob.

Brilliant! This is exactly what I was looking for.

Thank you - and kind regards,

On 23 9:50:27 AM, at 9:50 AM, Rob Walker wrote:


Should be very simple. When you register an alias, you can also supply an OSGi HttpContext object. This object has a getResource(String name) method who's job it is to resolve HTTP paths for that alias and return whatever HTML or other documents are needed.

By default, if not supplied the HTTP service creates a default context that serves up paths based on the getResource() method of the bundle's JAR classloader.

It should be a fairly trivial path to map this to a local file and create and return a file://xxx URL pointing to whatever local file you want to serve up.

 -- Rob

 timur mehrvarz wrote:

is there simple way to host static (HTML-) documents from a local filesystem folder (not part of a bundle) using the HTTP server in oscar?

 BR, Timur

You receive this message as a subscriber of the oscar@xxxxxxxxxxxxx mailing list.
To unsubscribe: mailto:oscar-unsubscribe@xxxxxxxxxxxxx
For general help: mailto:sympa@xxxxxxxxxxxxx?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws


Ascert - Taking systems to the Edge
+44 (0)20 7488 3470

<--  Date Index  --> <--  Thread Index  -->

Reply via email to:

Powered by MHonArc.

Copyright © 1999-2005, ObjectWeb Consortium | contact | webmaster.