Hi all, the both examples and its mechanism differs (thanks for providing it).
The one JB refers to is using a bundle header. This example has (the time I tested it) not worked for me. My research (at the time I comment this the first time) has been that this works for the usage of the "Web Application Specification" only. I did not check it again, but I was not aware that something has been changed. The one Achim refers to uses a HttpContextMapping service additional to the Servlet service and sets the necessary properties. Achim, thanks a lot for your example. This one is working for me! > https://github.com/ops4j/org.ops4j.pax.web/blob/master/samples/whiteboard-extended/src/main/java/org/ops4j/pax/web/extender/samples/whiteboard/internal/Activator.java As it is only an example, it does not matter, but there is a bug in this example. All the http context mapping service registrations are assigned to "httpContextMappingReg" and all servlet registrations to "servletReg". The respective ...2 and ...3 variables are not used. So, there is only one of each service unregistered and freed. Best regards, Markus