Project: Tomcat
Bug 55218 Upgrade Digester to be based on DefaultHandler2 and use LexicalHandler to detect publicId
Reported: 2013-07-09 07:27:23 | Status: closed fixed

Digester uses SAX2 features but is still based the SAX1 DefaultHandler. By upgrading to DefaultHandler2 it would be able to handle baseURIs when resolving entities and would have a default implementation of a LexicalHandler. Using LexicalHandler would allow it to respond directly to the startDTD event that reports the DOCTYPE (if present) so that it would not need to infer that from the first attempt to resolve an entity.

Files changed in fix:
java/org/apache/catalina/core/StandardContext.java java/org/apache/tomcat/util/descriptor/web/WebXml.java java/org/apache/tomcat/util/digester/Digester.java test/javax/servlet/resources/TestSchemaValidation.java test/org/apache/tomcat/util/descriptor/web/TestWebXml.java