Project: Tomcat
Bug 48371 addWebXmlMappings does not place servlet tags correctly
Reported: 2009-12-10 18:16:34 | Status: resolved fixed

If there is a commented-out <security-constraint> or commented-out <servlet> tag and addWebXmlMappings="true", the JSP's servlet and servlet-mapping tags are placed incorrectly and Tomcat will not start due to "--" being inside a comment. Basically, it seems the web.xml is not parsed correctly when using addWebXmlMappings and you cannot have above tags commented out, or new servlet tags will be placed incorrectly and comment tags not respected.

Files changed in fix:
java/org/apache/jasper/JspC.java