Hello Dave
Your logs are really helpful, I've found (in some.txt) that a servlet named "com.candatag.repository.servlet.RepoMenu" is registered into OCM-3 (/admin):
[paxweb-config-1-thread-1] INFO org.ops4j.pax.web.service.internal.HttpServiceEnabled - Registering ServletModel{id=ServletModel-9,name='com.candatag.repository.servlet.RepoMenu',urlPatterns=[/repo],contexts=[{WB,OCM-3,com.candatag.web.security.admin.services.AdminWebSecurity,/admin}]}
but only later this OCM-3 is passed to Jetty:
[paxweb-config-1-thread-1] INFO org.ops4j.pax.web.service.jetty.internal.JettyServerController - Receiving Batch{"Registration of OsgiContextModel{WB,id=OCM-3,name='com.candatag.web.security.admin.services.AdminWebSecurity',path='/admin',bundle=com.candatag.web.security.admin,ref={org.osgi.service.http.context.ServletContextHelper, com.candatag.web.security.admin.services.AdminWebSecurity}={
service.id=55,
osgi.http.whiteboard.context.name=com.candatag.web.security.admin.services.AdminWebSecurity, service.bundleid=18, service.scope=bundle,
component.name=com.candatag.web.security.admin.zoo.impl.AdminContext, osgi.http.whiteboard.context.path=/admin,
component.id=21}}", size=2}
[paxweb-config-1-thread-1] INFO org.ops4j.pax.web.service.jetty.internal.JettyServerWrapper - Creating new Jetty context for ServletContextModel{id=ServletContextModel-12,contextPath='/admin'}
[paxweb-config-1-thread-1] INFO org.ops4j.pax.web.service.jetty.internal.JettyServerWrapper - Adding OsgiContextModel{WB,id=OCM-3,name='com.candatag.web.security.admin.services.AdminWebSecurity',path='/admin',bundle=com.candatag.web.security.admin,ref={org.osgi.service.http.context.ServletContextHelper, com.candatag.web.security.admin.services.AdminWebSecurity}={
service.id=55,
osgi.http.whiteboard.context.name=com.candatag.web.security.admin.services.AdminWebSecurity, service.bundleid=18, service.scope=bundle,
component.name=com.candatag.web.security.admin.zoo.impl.AdminContext, osgi.http.whiteboard.context.path=/admin,
component.id=21}} to o.o.p.w.s.j.i.PaxWebServletContextHandler@48beedf5{/admin,null,STOPPED}
I'll ensure that this doesn't lead to problems.
I'll check further, bu if you could please set DEBUG log level for entire "org.ops4j.pax.web" logger and add timestamps, we'd get more information.
In server.txt I think everything looks fine though (if I read the DTOs correctly):
Servlet Context {"name":"default", "contextPath":"/", ..., "serviceId":39, "servletDTOs":[{"patterns":["/osgi/started"], ..., "name":"com.candatag.k8s.zoo.servlet.ReadyProbe", ...], ...}
- {"patterns":["/osgi/started"], ..., "name":"com.candatag.k8s.zoo.servlet.ReadyProbe", ...}
Servlet Context {"name":"default", "contextPath":"/", ..., "serviceId":0, "servletDTOs":[], ...}
- <no servlets>
Servlet Context {"name":"com.candatag.web.security.admin.services.AdminWebSecurity", "contextPath":"/admin", ..., "serviceId":40, "servletDTOs":[
- {"patterns":["/repo/localservice/console/services/view"], ..., "name":"com.candatag.osgi.console.servlet.ViewService", ...},
- {"patterns":["/repo/localservice/console/services"], ..., "name":"com.candatag.osgi.console.servlet.Services", ...},
- {"patterns":["/repo/localservice/console/services/check"], ..., "name":"com.candatag.osgi.console.servlet.SystemCheck", ...},
- {"patterns":["/repo/localservice/console/run"], ..., "name":"com.candatag.osgi.console.servlet.RunService", }
], ...}
so "/osgi/started" servlet is registered to "/" context, which is (from Whiteboard point of view) "backed" by OCM-3 (serviceId=39) - the one registered by you, not the default one from pax-web-extender-whiteboard.
However, in "some.txt", I see what I mentioned - that a servlet registration is being handled before OCM-3 is processed. Indeed, in code, the OsgiContextModel is added to Whiteboard internal structures, before it's passed further. And in between, a servlet may refer to it. Checking.
regards
Grzegorz Grzybek