Hi I'm currently working on integrating embedded tomcat in the OPS4j Pax Web OSGi container as alternativ underlying web container. Right now I'm stuck on a certain point that is kind of hard to understand so I'm sure I'm doing something "awfully" wrong :)
So here is what I'm struggling with. Using Tomcat 8 embedded core While the context is started I eventually end up at [1] This is the point I don't get cause I'd expect Servlets to be started at [2], but obviously the Servlets are already started at [1]. Therefore the ServletContainerInitializers are never called [3]. Now my question, what am I doing wrong, as all servlets are registered as children. I'm very well aware that these questions might not really make a lot of sense, therefore you'll find the current implementation at [4]. regards, Achim [1] - https://github.com/apache/tomcat/blob/trunk/java/org/apache/catalina/core/StandardContext.java#L5098 [2] - https://github.com/apache/tomcat/blob/trunk/java/org/apache/catalina/core/StandardContext.java#L5229 [3] - https://github.com/apache/tomcat/blob/trunk/java/org/apache/catalina/core/StandardContext.java#L5182 [4] - https://github.com/ops4j/org.ops4j.pax.web/blob/master/pax-web-tomcat/src/main/java/org/ops4j/pax/web/service/tomcat/internal/TomcatServerWrapper.java#L342 -- Apache Member Apache Karaf <http://karaf.apache.org/> Committer & PMC OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer & Project Lead blog <http://notizblog.nierbeck.de/> Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS> Software Architect / Project Manager / Scrum Master