Bug 62755

Summary: Add a Setter to Tomcat class to Allow Opting Out of Default Web Xml Config
Product: Tomcat 9 Reporter: Igal Sapir <isapir>
Component: CatalinaAssignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: unspecified   
Target Milestone: -----   
Hardware: PC   
OS: Linux   

Description Igal Sapir 2018-09-22 16:50:32 UTC
org.apache.catalina.startup.Tomcat.addWebapp() always adds the default web.xml config settings, e.g. the default servlet and the JSP servlet.  Calling addWebapp() is a very common method to embed Tomcat in other systems, but it is those systems where the default config is many times not required or not desired. 

Adding a setter to the Tomcat class to allow the user to opt-out of adding the defaults will allow users to configure the system according to their needs, either by adding the required configurations programmatically, or by using web.xml deployment descriptors.

See also discussion at https://www.mail-archive.com/users@tomcat.apache.org/msg130097.html

I plan to add this myself.
Comment 1 Igal Sapir 2018-09-22 20:21:52 UTC
Added in git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1841692 13f79535-47bb-0310-9956-ffa450edef68