Hi,

thank you for your answer and your help.

I think now I understand what you mean. You seem to assume that a resource is 
always a directory. But what I was trying to do is to register a single
file as resource. The javadoc of the HttpService does not forbid to do so, 
and I was doing the same thing in knopflerfish and equinox and it worked.

Of course I could change my application and always register a whole directory,
even if I just have one file to register, but it would be nice if felix
could support this either.


Best regards,
Martin

Rob wrote: 
> What this is saying to me is " alias requests to '/ as '/image.png' " - 
> which may not be what you want.
> 
> The more common approach from examples we've worked with, where it's 
> typical to register aliases to paths where several resources are 
> located, as opposed to alias every specific resource e.g.
> 
>     m_httpServ.registerResources("/resource", 
> "/org/ungoverned/osgi/bundle/httptest/resource", null);
> 
>     (this is from the httptest bundle that is still available on OBR 
> at    http://oscar-osgi.sourceforge.net/     which has some source if 
> you want examples)
> 
> One thing to be careful of, which is why the alias mechanism exists, is 
> that the HTTP namespace is global, but multiple bundles may have their 
> own package/dir namespace - so each bundle needs to be careful that the 
> aliases it registers map to files in their resource space, and don't 
> collide with other aliases from other bundles
> 
> If image.png is a resource in the root of your bundle, then you may be 
> able to use following:
> 
> http.registerResources("/", "/", null);
> 
> (this assumes a getResource("/image.png") for your bundle's context 
> would locate the required resource)
> 
> The trouble here, is that by registering the "root" as an alias, you may 
> limit/collide with anything other bundles want to register - you'll 
> effectively be saying go to this bundle for all / resources.

-- 
GMX startet ShortView.de. Hier findest Du Leute mit Deinen Interessen!
Jetzt dabei sein: http://www.shortview.de/[EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to