Search in sources :

Example 16 with TagInfo

use of javax.servlet.jsp.tagext.TagInfo in project tomcat70 by apache.

the class ImplicitTagLibraryInfo method getTagFile.

/**
 * Checks to see if the given tag name maps to a tag file path,
 * and if so, parses the corresponding tag file.
 *
 * @return The TagFileInfo corresponding to the given tag name, or null if
 * the given tag name is not implemented as a tag file
 */
@Override
public TagFileInfo getTagFile(String shortName) {
    TagFileInfo tagFile = super.getTagFile(shortName);
    if (tagFile == null) {
        String path = tagFileMap.get(shortName);
        if (path == null) {
            return null;
        }
        TagInfo tagInfo = null;
        try {
            tagInfo = TagFileProcessor.parseTagFileDirectives(pc, shortName, path, pc.getJspCompilationContext().getTagFileJarResource(path), this);
        } catch (JasperException je) {
            throw new RuntimeException(je.toString(), je);
        }
        tagFile = new TagFileInfo(shortName, path, tagInfo);
        vec.addElement(tagFile);
        this.tagFiles = new TagFileInfo[vec.size()];
        vec.copyInto(this.tagFiles);
    }
    return tagFile;
}
Also used : TagFileInfo(javax.servlet.jsp.tagext.TagFileInfo) JasperException(org.apache.jasper.JasperException) TagInfo(javax.servlet.jsp.tagext.TagInfo)

Aggregations

TagInfo (javax.servlet.jsp.tagext.TagInfo)16 TagFileInfo (javax.servlet.jsp.tagext.TagFileInfo)9 FileNotFoundException (java.io.FileNotFoundException)7 TagAttributeInfo (javax.servlet.jsp.tagext.TagAttributeInfo)5 TagLibraryInfo (javax.servlet.jsp.tagext.TagLibraryInfo)5 JasperException (org.apache.sling.scripting.jsp.jasper.JasperException)5 IOException (java.io.IOException)4 JasperException (org.apache.jasper.JasperException)4 Iterator (java.util.Iterator)3 Vector (java.util.Vector)3 TagExtraInfo (javax.servlet.jsp.tagext.TagExtraInfo)3 TreeNode (org.apache.jasper.xmlparser.TreeNode)3 Hashtable (java.util.Hashtable)2 TagVariableInfo (javax.servlet.jsp.tagext.TagVariableInfo)2 TreeNode (org.apache.sling.scripting.jsp.jasper.xmlparser.TreeNode)2 Attributes (org.xml.sax.Attributes)2 SAXException (org.xml.sax.SAXException)2 SAXParseException (org.xml.sax.SAXParseException)2 InvocationTargetException (java.lang.reflect.InvocationTargetException)1 List (java.util.List)1