Hi David,

according to ServletContext.getContextPath() it is possible that multiple context paths map to the same ServletContext. The HttpService spec requires that there is a 1:1 mapping between the HttpContext and the ServletContext. This conceptual abstraction should be handed down to the servlet container implementation. So whatever represents the ServletContext at the JBossWeb/Undertow layer should be mapped to the HttpContext object that is used for a given registration.

HttpContext ctxA = ...
HttpService.registerServlet("/xxx/aaa", servletA, null, ctxA);
HttpService.registerServlet("/yyy/aaa", servletB, null, ctxA);

Should result in one
JBossWeb/Undertow context being created with '/xxx/aaa' as the primary path. The second registration should reuse that context and setup an alias path of '/yyy/aaa'.

cheers
--thomas
-- 
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Thomas Diesler
JBoss OSGi Lead
JBoss, a division of Red Hat
xxxxxxxxxxxxxxxxxxxxxxxxxxxx