String tagName = path.substring(path.lastIndexOf("/") + 1);
tagName = tagName.substring(0,
tagName.lastIndexOf(suffix));
tagFileMap.put(tagName, path);
} else if (path.endsWith(IMPLICIT_TLD)) {
TaglibXml taglibXml;
try {
URL url = ctxt.getResource(path);
TldResourcePath resourcePath = new TldResourcePath(url, path);
ServletContext servletContext = ctxt.getServletContext();
boolean validate = Boolean.parseBoolean(
servletContext.getInitParameter(
Constants.XML_VALIDATION_TLD_INIT_PARAM));
String blockExternalString = servletContext.getInitParameter(
Constants.XML_BLOCK_EXTERNAL_INIT_PARAM);
boolean blockExternal;
if (blockExternalString == null) {
blockExternal = Constants.IS_SECURITY_ENABLED;
} else {
blockExternal = Boolean.parseBoolean(blockExternalString);
}
TldParser parser = new TldParser(true, validate,
new ImplicitTldRuleSet(), blockExternal);
taglibXml = parser.parse(resourcePath);
} catch (IOException | SAXException e) {
err.jspError(e);
// unreached
throw new JasperException(e);
}
this.tlibversion = taglibXml.getTlibVersion();
this.jspversion = taglibXml.getJspVersion();
try {
double version = Double.parseDouble(this.jspversion);
if (version < 2.0) {
err.jspError("jsp.error.invalid.implicit.version", path);
}