I want to embed Tomcat in a simple application that does not use JSP, and that sets the default servlet's listings initParam to true.
When I use the StandardContext, Tomcat.initWebappDefaults() [1] is called and adds the default servlet and the JSP servlet. I would like to prevent that, but hopefully without having to rewrite the whole Tomcat class nor to subclass it. Further, when I try to override a setting in WEB-INF/web.xml, e.g. to specify init-param of "listings" with value "true" for the servlet "default", I get an error that "default" is not unique, but in a regular Tomcat deployment that works just fine. Is there an easy way to override Tomcat.initWebappDefaults() or to prevent it from being called? Thanks, Igal [1] https://github.com/apache/tomcat/blob/trunk/java/org/apache/catalina/startup/Tomcat.java#L918