Have a deeper look to HttpService#registerResource. An appropriate implementation comes with Apache Felix HttpService. That should solve your problem in a programmatically way. Unfortunality, I don't now any declarativ one.
UPDATE: Listing 7 on this page gives you an overview how to use it. The rest of this article is used with the Equinox framework.