use of jakarta.servlet.jsp.tagext.TagFileInfo in project tomcat by apache.
the class TagLibraryInfoImpl method createTagFileInfo.
// Impossible for path to be null at warning
@SuppressWarnings("null")
private TagFileInfo createTagFileInfo(TagFileXml tagFileXml, Jar jar) throws JasperException {
String name = tagFileXml.getName();
String path = tagFileXml.getPath();
if (path == null) {
// path is required
err.jspError("jsp.error.tagfile.missingPath");
} else if (!path.startsWith("/META-INF/tags") && !path.startsWith("/WEB-INF/tags")) {
err.jspError("jsp.error.tagfile.illegalPath", path);
}
if (jar == null && path.startsWith("/META-INF/tags")) {
// This is a tag file that was packaged in a JAR that has been
// unpacked into /WEB-INF/classes (probably by an IDE). Adjust the
// path accordingly.
path = "/WEB-INF/classes" + path;
}
TagInfo tagInfo = TagFileProcessor.parseTagFileDirectives(parserController, name, path, jar, this);
return new TagFileInfo(name, path, tagInfo);
}
Aggregations