}
private WebXml buildMergedWebXml(boolean validate, boolean blockExternal)
throws JasperException {
WebXml webXml = new WebXml();
WebXmlParser webXmlParser = new WebXmlParser(validate, validate, 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);
}