We have an application which keeps loading instances of ServletContainerInitializer from our 3rd party libs.
One instance is JerseyServletContainerInitializer and th
I found that neither of the given answers worked.
The only way to actually filter out 3rd-party SCIs from the classpath turned out to be the containerSciFilter
attribute of the Context container (in context.xml
), which is defined as
The regular expression that specifies which container provided SCIs should be filtered out and not used for this context. Matching uses java.util.regex.Matcher.find() so the regular expression only has to match a sub-string of the fully qualified class name of the container provided SCI for it to be filtered out. If not specified, no filtering will be applied.
In my case, I wanted to filter out stuff like org.eclipse.jetty.apache.jsp.JettyJasperInitializer
so I used