Bug 62755 - Add a Setter to Tomcat class to Allow Opting Out of Default Web Xml Config
Summary: Add a Setter to Tomcat class to Allow Opting Out of Default Web Xml Config
Alias: None
Product: Tomcat 9
Classification: Unclassified
Component: Catalina (show other bugs)
Version: unspecified
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: -----
Assignee: Tomcat Developers Mailing List
Depends on:
Reported: 2018-09-22 16:50 UTC by Igal Sapir
Modified: 2018-09-22 20:21 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
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