You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Martin Thelian <Ma...@gmx.at> on 2008/02/23 11:45:25 UTC

HttpService.registerResources

Hi,

I have problems registering resources via the HttpService in Apache Felix. I'm using Apache Felix Version 1.0.3 and the HttpService-Bundle org.apache.felix.http.jetty-0.8.0-SNAPSHOT.jar.

My Problem is that:
|> http.registerResources("/image.png", "/image.png", null);

does not work. It seems that the HttpService-Bundle internally registers the resource as "image.png/" because I'm getting the following error message in the console:
|> WARNING: image.png/ (org.apache.felix.moduleloader.ResourceNotFoundException: image.png/)

And my browser is always redirected from "/image.png" to "/image.png/":
|> ~$ telnet localhost 8080
|> Trying 127.0.0.1...
|> Connected to localhost.
|> Escape character is '^]'.
|> GET /image.png HTTP/1.0
|> Host: localhost
|> 
|> HTTP/1.1 302 Moved Temporarily
|> Date: Fri, 22 Feb 2008 13:51:09 GMT
|> Server: Jetty/4.2.x (Linux/2.6.20-16-generic i386 java/1.5.0_11)
|> Location: http://localhost/image.png/
|> Connection: close

If I start felix in debugging-mode, put a breakpoint into org.apache.felix.http.jetty.OsgiResourceHandler function "handle( String pathInContext,...)" and change the value of the requested resource name from "/image.png/" back to "/image.png" it works fine.

I've also tested my bundle with knopflerfish where it works without a problem. What can I do to get it to run with Apache felix? Thanks.

Regards,
Martin

-- 
Psst! Geheimtipp: Online Games kostenlos spielen bei den GMX Free Games! 
http://games.entertainment.web.de/de/entertainment/games/free

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org