if (blockExternalString == null) {
blockExternal = Constants.IS_SECURITY_ENABLED;
} else {
blockExternal = Boolean.parseBoolean(blockExternalString);
}
WebXmlParser webXmlParser = new WebXmlParser(false, false, blockExternal);
// Use this class's classloader as Ant will have set the TCCL to its own
webXmlParser.setClassLoader(getClass().getClassLoader());
try {
URL url = getResource(
org.apache.tomcat.util.descriptor.web.Constants.WEB_XML_LOCATION);
if (!webXmlParser.parseWebXml(url, webXml, false)) {
throw new JasperException(Localizer.getMessage("jspc.error.invalidWebXml"));
}
} catch (IOException e) {
throw new JasperException(e);
}