> This bundle never created an HttpContext, it > still looks magic to me how the webservers knows what to expose...
The magic lies in HttpService being a service factory [1]. So whenever a bundle obtains a reference to HttpService it *knows* which bundle the reference is being given to. Further it creates a default http context based on the bundle [2]. So when you register resource it knows from which bundle the request for that resource needs to be served. Chetan Mehrotra [1] https://github.com/apache/felix/blob/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/service/HttpServiceFactory.java [2] https://github.com/apache/felix/blob/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/service/HttpServiceImpl.java#L119 --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]

