类javax.servlet.jsp.tagext.TagLibraryInfo源码实例Demo

下面列出了怎么用javax.servlet.jsp.tagext.TagLibraryInfo的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: Tomcat8-Source-Read   文件: JasperTagInfo.java
public JasperTagInfo(String tagName,
        String tagClassName,
        String bodyContent,
        String infoString,
        TagLibraryInfo taglib,
        TagExtraInfo tagExtraInfo,
        TagAttributeInfo[] attributeInfo,
        String displayName,
        String smallIcon,
        String largeIcon,
        TagVariableInfo[] tvi,
        String mapName) {

    super(tagName, tagClassName, bodyContent, infoString, taglib,
            tagExtraInfo, attributeInfo, displayName, smallIcon, largeIcon,
            tvi);

    this.dynamicAttrsMapName = mapName;
}
 
源代码2 项目: Tomcat8-Source-Read   文件: TagFileProcessor.java
/**
 * Parses the tag file, and collects information on the directives included
 * in it. The method is used to obtain the info on the tag file, when the
 * handler that it represents is referenced. The tag file is not compiled
 * here.
 *
 * @param pc
 *            the current ParserController used in this compilation
 * @param name
 *            the tag name as specified in the TLD
 * @param path
 *            the path for the tagfile
 * @param jar
 *            the Jar resource containing the tag file
 * @param tagLibInfo
 *            the TagLibraryInfo object associated with this TagInfo
 * @return a TagInfo object assembled from the directives in the tag file.
 *
 * @throws JasperException If an error occurs during parsing
 */
@SuppressWarnings("null") // page can't be null
public static TagInfo parseTagFileDirectives(ParserController pc,
        String name, String path, Jar jar, TagLibraryInfo tagLibInfo)
        throws JasperException {


    ErrorDispatcher err = pc.getCompiler().getErrorDispatcher();

    Node.Nodes page = null;
    try {
        page = pc.parseTagFileDirectives(path, jar);
    } catch (IOException e) {
        err.jspError("jsp.error.file.not.found", path);
    }

    TagFileDirectiveVisitor tagFileVisitor = new TagFileDirectiveVisitor(pc
            .getCompiler(), tagLibInfo, name, path);
    page.visit(tagFileVisitor);
    tagFileVisitor.postCheck();

    return tagFileVisitor.getTagInfo();
}
 
源代码3 项目: netbeans   文件: PageInfo.java
public PageInfo(/*BeanRepository beanRepository*/
           Map<String, TagLibraryInfo> taglibsMap,
           Map<String, String> jspPrefixMapper,
           Map<String, LinkedList<String>> xmlPrefixMapper,
           Map approxXmlPrefixMapper,
           List<String> imports,
           List<String> dependants,
           List includePrelude,
           List includeCoda,
           List<String> pluginDcls,
           Set<String> prefixes
       ) {
//this.beanRepository = beanRepository;
this.taglibsMap = taglibsMap;
this.jspPrefixMapper = jspPrefixMapper;
this.xmlPrefixMapper = xmlPrefixMapper;
       this.approxXmlPrefixMapper = approxXmlPrefixMapper;
this.imports = imports;
       this.dependants = dependants;
this.includePrelude = includePrelude;
this.includeCoda = includeCoda;
this.pluginDcls = pluginDcls;
this.prefixes = prefixes;
       this.isTagFile = false;
   }
 
源代码4 项目: netbeans   文件: JspHyperlinkProvider.java
private FileObject getTagFile(TokenSequence<?> tokenSequence, JspSyntaxSupport jspSup) {
    Token token = tokenSequence.token();
    if (token.id() == JspTokenId.TAG) {
        String image = token.text().toString().trim();
        if (image.startsWith("<")) {                                 // NOI18N
            image = image.substring(1).trim();
        }
        if (!image.startsWith("jsp:") && image.indexOf(':') != -1) {  // NOI18N
            List l = jspSup.getTags(image);
            if (l.size() == 1) {
                TagLibraryInfo libInfo = ((TagInfo) l.get(0)).getTagLibrary();
                if (libInfo != null) {
                    TagFileInfo fileInfo = libInfo.getTagFile(getTagName(image));
                    if (fileInfo != null) {
                        return JspUtils.getFileObject(jspSup.getDocument(),
                                fileInfo.getPath());
                    }
                }
            }
        }
    }
    return null;
}
 
源代码5 项目: Tomcat7.0.67   文件: JasperTagInfo.java
public JasperTagInfo(String tagName,
        String tagClassName,
        String bodyContent,
        String infoString,
        TagLibraryInfo taglib,
        TagExtraInfo tagExtraInfo,
        TagAttributeInfo[] attributeInfo,
        String displayName,
        String smallIcon,
        String largeIcon,
        TagVariableInfo[] tvi,
        String mapName) {

    super(tagName, tagClassName, bodyContent, infoString, taglib,
            tagExtraInfo, attributeInfo, displayName, smallIcon, largeIcon,
            tvi);
    
    this.dynamicAttrsMapName = mapName;
}
 
源代码6 项目: Tomcat7.0.67   文件: PageInfo.java
PageInfo(BeanRepository beanRepository, String jspFile, boolean isTagFile) {
    this.isTagFile = isTagFile;
    this.jspFile = jspFile;
    this.beanRepository = beanRepository;
    this.varInfoNames = new HashSet<String>();
    this.taglibsMap = new HashMap<String, TagLibraryInfo>();
    this.jspPrefixMapper = new HashMap<String, String>();
    this.xmlPrefixMapper = new HashMap<String, LinkedList<String>>();
    this.nonCustomTagPrefixMap = new HashMap<String, Mark>();
    this.imports = new Vector<String>();
    this.dependants = new HashMap<String,Long>();
    this.includePrelude = new Vector<String>();
    this.includeCoda = new Vector<String>();
    this.pluginDcls = new Vector<String>();
    this.prefixes = new HashSet<String>();

    // Enter standard imports
    imports.addAll(Constants.STANDARD_IMPORTS);
}
 
源代码7 项目: tomcatsrc   文件: JasperTagInfo.java
public JasperTagInfo(String tagName,
        String tagClassName,
        String bodyContent,
        String infoString,
        TagLibraryInfo taglib,
        TagExtraInfo tagExtraInfo,
        TagAttributeInfo[] attributeInfo,
        String displayName,
        String smallIcon,
        String largeIcon,
        TagVariableInfo[] tvi,
        String mapName) {

    super(tagName, tagClassName, bodyContent, infoString, taglib,
            tagExtraInfo, attributeInfo, displayName, smallIcon, largeIcon,
            tvi);
    
    this.dynamicAttrsMapName = mapName;
}
 
源代码8 项目: tomcatsrc   文件: PageInfo.java
PageInfo(BeanRepository beanRepository, String jspFile, boolean isTagFile) {
    this.isTagFile = isTagFile;
    this.jspFile = jspFile;
    this.beanRepository = beanRepository;
    this.varInfoNames = new HashSet<String>();
    this.taglibsMap = new HashMap<String, TagLibraryInfo>();
    this.jspPrefixMapper = new HashMap<String, String>();
    this.xmlPrefixMapper = new HashMap<String, LinkedList<String>>();
    this.nonCustomTagPrefixMap = new HashMap<String, Mark>();
    this.imports = new Vector<String>();
    this.dependants = new HashMap<String,Long>();
    this.includePrelude = new Vector<String>();
    this.includeCoda = new Vector<String>();
    this.pluginDcls = new Vector<String>();
    this.prefixes = new HashSet<String>();

    // Enter standard imports
    imports.addAll(Constants.STANDARD_IMPORTS);
}
 
源代码9 项目: packagedrone   文件: JspC.java
private void initServletContext() {
    try {
        context =new JspCServletContext
            (new PrintWriter(new OutputStreamWriter(System.out, "UTF-8")),

             new URL("file:" + uriRoot.replace('\\','/') + '/'));
        tldScanner = new TldScanner(context, isValidationEnabled);

        // START GlassFish 750
        taglibs = new ConcurrentHashMap<String, TagLibraryInfo>();
        context.setAttribute(Constants.JSP_TAGLIBRARY_CACHE, taglibs);

        tagFileJarUrls = new ConcurrentHashMap<String, URL>();
        context.setAttribute(Constants.JSP_TAGFILE_JAR_URLS_CACHE,
                             tagFileJarUrls);
        // END GlassFish 750
    } catch (MalformedURLException me) {
        System.out.println("**" + me);
    } catch (UnsupportedEncodingException ex) {
    }
    rctxt = new JspRuntimeContext(context, this);
    jspConfig = new JspConfig(context);
    tagPluginManager = new TagPluginManager(context);
}
 
源代码10 项目: packagedrone   文件: ImplicitTagLibraryInfo.java
/**
 * Returns an array of TagLibraryInfo objects representing the entire set
 * of tag libraries (including this TagLibraryInfo) imported by taglib
 * directives in the translation unit that references this
 * TagLibraryInfo.
 *
 * If a tag library is imported more than once and bound to different
 * prefices, only the TagLibraryInfo bound to the first prefix must be
 * included in the returned array.
 *
 * @return Array of TagLibraryInfo objects representing the entire set
 * of tag libraries (including this TagLibraryInfo) imported by taglib
 * directives in the translation unit that references this TagLibraryInfo.
 *
 * @since 2.1
 */
public TagLibraryInfo[] getTagLibraryInfos() {

    TagLibraryInfo[] taglibs = null;

    Collection c = pageInfo.getTaglibs();
    if (c != null) {
        Object[] objs = c.toArray();
        if (objs != null && objs.length > 0) {
            taglibs = new TagLibraryInfo[objs.length];
            for (int i=0; i<objs.length; i++) {
                taglibs[i] = (TagLibraryInfo) objs[i];
            }
        }
    }

    return taglibs;
}
 
源代码11 项目: packagedrone   文件: PageInfo.java
PageInfo(BeanRepository beanRepository, String jspFile) {

        this.jspFile = jspFile;
	this.beanRepository = beanRepository;
	this.taglibsMap = new HashMap<String, TagLibraryInfo>();
	this.jspPrefixMapper = new HashMap<String, String>();
	this.xmlPrefixMapper = new HashMap<String, LinkedList<String>>();
        this.nonCustomTagPrefixMap = new HashMap<String, Mark>();
	this.imports = new ArrayList<String>();
        this.dependants = new ArrayList<String>();
	this.includePrelude = new ArrayList<String>();
	this.includeCoda = new ArrayList<String>();
	this.pluginDcls = new ArrayList<String>();
	this.prefixes = new HashSet<String>();

	// Enter standard imports
	for(int i = 0; i < STANDARD_IMPORTS.length; i++)
	    imports.add(STANDARD_IMPORTS[i]);
    }
 
源代码12 项目: Tomcat8-Source-Read   文件: JspDocumentParser.java
@Override
public void startPrefixMapping(String prefix, String uri)
    throws SAXException {
    TagLibraryInfo taglibInfo;

    if (directivesOnly && !(JSP_URI.equals(uri))) {
        return;
    }

    try {
        taglibInfo = getTaglibInfo(prefix, uri);
    } catch (JasperException je) {
        throw new SAXParseException(
            Localizer.getMessage("jsp.error.could.not.add.taglibraries"),
            locator,
            je);
    }

    if (taglibInfo != null) {
        if (pageInfo.getTaglib(uri) == null) {
            pageInfo.addTaglib(uri, taglibInfo);
        }
        pageInfo.pushPrefixMapping(prefix, uri);
    } else {
        pageInfo.pushPrefixMapping(prefix, null);
    }
}
 
源代码13 项目: Tomcat8-Source-Read   文件: TagFileProcessor.java
public TagFileDirectiveVisitor(Compiler compiler,
        TagLibraryInfo tagLibInfo, String name, String path) {
    err = compiler.getErrorDispatcher();
    this.tagLibInfo = tagLibInfo;
    this.name = name;
    this.path = path;
    attributeVector = new Vector<>();
    variableVector = new Vector<>();
}
 
源代码14 项目: netbeans   文件: PageInfo.java
private String taglibsMapToString(Map m, String indent) {
    StringBuilder sb = new StringBuilder();
    Iterator it = new TreeSet(m.keySet()).iterator();
    while (it.hasNext()) {
        Object key = it.next();
        sb.append(indent).append("tag library: ").append(key).append('\n');  // NOI18N
        sb.append(tagLibraryInfoToString((TagLibraryInfo)m.get(key), indent + "    "));  // NOI18N
    }
    return sb.toString();
}
 
源代码15 项目: netbeans   文件: PageInfo.java
public String tagLibraryInfoToString(TagLibraryInfo info, String indent) {
    StringBuilder sb = new StringBuilder();
    sb.append(indent).append("tlibversion : ").append(getFieldByReflection("tlibversion", info)).append('\n');  // NOI18N
    sb.append(indent).append("jspversion  : ").append(info.getRequiredVersion()).append('\n');  // NOI18N
    sb.append(indent).append("shortname   : ").append(info.getShortName()).append('\n');  // NOI18N
    sb.append(indent).append("urn         : ").append(info.getReliableURN()).append('\n');  // NOI18N
    sb.append(indent).append("info        : ").append(info.getInfoString()).append('\n');  // NOI18N
    sb.append(indent).append("uri         : ").append(info.getURI()).append('\n');  // NOI18N
    
    TagInfo tags[] = info.getTags();
    if (tags != null) {
        for (int i = 0; i < tags.length; i++)
            sb.append(tagInfoToString(tags[i], indent + "  "));  // NOI18N
    }
    
    TagFileInfo tagFiles[] = info.getTagFiles().clone();
    Arrays.sort(tagFiles, TAG_FILE_INFO_COMPARATOR);
    if (tagFiles != null) {
        for (int i = 0; i < tagFiles.length; i++)
            sb.append(tagFileToString(tagFiles[i], indent + "  "));  // NOI18N
    }
    
    FunctionInfo functions[] = info.getFunctions();
    if (functions != null) {
        for (int i = 0; i < functions.length; i++)
            sb.append(functionInfoToString(functions[i], indent + "  "));  // NOI18N
    }
    
    return sb.toString();
}
 
源代码16 项目: netbeans   文件: CacheTest.java
public void xxxtestCachedTagLibInfos() throws Exception {
    JspParserImpl jspParser = getJspParser();

    FileObject jspFo = TestUtil.getProjectFile(this, "project2", "/web/basic.jspx");
    WebModule webModule = TestUtil.getWebModule(jspFo);

    ParseResult result = jspParser.analyzePage(jspFo, webModule, JspParserAPI.ERROR_IGNORE);
    Collection<TagLibraryInfo> tagLibs1 = result.getPageInfo().getTaglibs();

    jspFo = TestUtil.getProjectFile(this, "project2", "/web/basic.jspx");
    result = jspParser.analyzePage(jspFo, webModule, JspParserAPI.ERROR_IGNORE);
    Collection<TagLibraryInfo> tagLibs2 = result.getPageInfo().getTaglibs();

    assertTrue(tagLibs1.size() > 0);
    assertTrue(tagLibs2.size() > 0);
    assertTrue(tagLibs1.size() == tagLibs2.size());

    Iterator<TagLibraryInfo> iter1 = tagLibs1.iterator();
    Iterator<TagLibraryInfo> iter2 = tagLibs2.iterator();
    while (iter1.hasNext()) {
        TagLibraryInfo tagLibraryInfo1 = iter1.next();
        TagLibraryInfo tagLibraryInfo2 = iter2.next();
        assertNotNull(tagLibraryInfo1);
        assertNotNull(tagLibraryInfo2);
        assertTrue("TagLibInfos should be exactly the same", tagLibraryInfo1 == tagLibraryInfo2);
    }
}
 
源代码17 项目: netbeans   文件: JspPaletteUtilities.java
/**************************************************************************/
public static String getTagLibPrefix(JTextComponent target, String tagLibUri) {
    FileObject fobj = getFileObject(target);
    if (fobj != null) {
        JspParserAPI.ParseResult result = JspContextInfo.getContextInfo(fobj).getCachedParseResult(fobj, false, true);
        if (result != null && result.getPageInfo() != null) {
             for (TagLibraryInfo tli : result.getPageInfo().getTaglibs()) {
                 if (tagLibUri.equals(tli.getURI()))
                     return tli.getPrefixString();
             }
        }
    }
    return null;
}
 
源代码18 项目: netbeans   文件: JspColoringData.java
private static boolean equalsColoringInformation(Map taglibs1, Map prefixMapper1, Map taglibs2, Map prefixMapper2) {
    if ((taglibs1 == null) != (taglibs2 == null)) {
        return false;
    }
    if ((prefixMapper1 == null) != (prefixMapper2 == null)) {
        return false;
    }
    if (prefixMapper1.size() != prefixMapper2.size()) {
        return false;
    }
    else {
        Iterator it = prefixMapper1.keySet().iterator();
        while (it.hasNext()) {
            Object prefix = it.next();
            Object key1 = prefixMapper1.get(prefix);
            Object key2 = prefixMapper2.get(prefix);
            if ((key1 == null) || (key2 == null)) {
                return false;
            }
            TagLibraryInfo tli1 = (TagLibraryInfo)taglibs1.get(key1);
            TagLibraryInfo tli2 = (TagLibraryInfo)taglibs2.get(key2);
            if ((tli1 == null) || (tli2 == null)) {
                return false;
            }
            if (!equalsColoringInformation(tli1, tli2)) {
                return false;
            }
        }
        return true;
    }
}
 
源代码19 项目: netbeans   文件: JspColoringData.java
private static boolean equalsColoringInformation(TagLibraryInfo tli1, TagLibraryInfo tli2) {
    /** PENDING
     * should be going through all tags and checking whether the value 
     * returned by tagInfo.getBodyContent() has not changed.
     */
    return true;
}
 
源代码20 项目: Tomcat7.0.67   文件: JspDocumentParser.java
@Override
public void startPrefixMapping(String prefix, String uri)
    throws SAXException {
    TagLibraryInfo taglibInfo;

    if (directivesOnly && !(JSP_URI.equals(uri))) {
        return;
    }

    try {
        taglibInfo = getTaglibInfo(prefix, uri);
    } catch (JasperException je) {
        throw new SAXParseException(
            Localizer.getMessage("jsp.error.could.not.add.taglibraries"),
            locator,
            je);
    }

    if (taglibInfo != null) {
        if (pageInfo.getTaglib(uri) == null) {
            pageInfo.addTaglib(uri, taglibInfo);
        }
        pageInfo.pushPrefixMapping(prefix, uri);
    } else {
        pageInfo.pushPrefixMapping(prefix, null);
    }
}
 
源代码21 项目: Tomcat7.0.67   文件: TagFileProcessor.java
public TagFileDirectiveVisitor(Compiler compiler,
        TagLibraryInfo tagLibInfo, String name, String path) {
    err = compiler.getErrorDispatcher();
    this.tagLibInfo = tagLibInfo;
    this.name = name;
    this.path = path;
    attributeVector = new Vector<TagAttributeInfo>();
    variableVector = new Vector<TagVariableInfo>();
}
 
源代码22 项目: tomcatsrc   文件: JspDocumentParser.java
@Override
public void startPrefixMapping(String prefix, String uri)
    throws SAXException {
    TagLibraryInfo taglibInfo;

    if (directivesOnly && !(JSP_URI.equals(uri))) {
        return;
    }

    try {
        taglibInfo = getTaglibInfo(prefix, uri);
    } catch (JasperException je) {
        throw new SAXParseException(
            Localizer.getMessage("jsp.error.could.not.add.taglibraries"),
            locator,
            je);
    }

    if (taglibInfo != null) {
        if (pageInfo.getTaglib(uri) == null) {
            pageInfo.addTaglib(uri, taglibInfo);
        }
        pageInfo.pushPrefixMapping(prefix, uri);
    } else {
        pageInfo.pushPrefixMapping(prefix, null);
    }
}
 
源代码23 项目: tomcatsrc   文件: TagFileProcessor.java
public TagFileDirectiveVisitor(Compiler compiler,
        TagLibraryInfo tagLibInfo, String name, String path) {
    err = compiler.getErrorDispatcher();
    this.tagLibInfo = tagLibInfo;
    this.name = name;
    this.path = path;
    attributeVector = new Vector<TagAttributeInfo>();
    variableVector = new Vector<TagVariableInfo>();
}
 
源代码24 项目: packagedrone   文件: TagFileProcessor.java
public TagFileDirectiveVisitor(Compiler compiler,
                               TagLibraryInfo tagLibInfo,
                               String name,
                               String path) {
    err = compiler.getErrorDispatcher();
    this.tagLibInfo = tagLibInfo;
    this.name = name;
    this.path = path;
    attributeVector = new ArrayList<TagAttributeInfo>();
    variableVector = new ArrayList<TagVariableInfo>();

    jspVersionDouble = Double.valueOf(tagLibInfo.getRequiredVersion());
}
 
源代码25 项目: Tomcat8-Source-Read   文件: JspC.java
/**
 * {@inheritDoc}
 */
@Override
public Map<String, TagLibraryInfo> getCache() {
    return cache;
}
 
@Override
public Map<String, TagLibraryInfo> getCache() {
    return null;
}
 
源代码27 项目: Tomcat8-Source-Read   文件: Validator.java
/**
 * Validate XML view against the TagLibraryValidator classes of all imported
 * tag libraries.
 */
private static void validateXmlView(PageData xmlView, Compiler compiler)
        throws JasperException {

    StringBuilder errMsg = null;
    ErrorDispatcher errDisp = compiler.getErrorDispatcher();

    for (Iterator<TagLibraryInfo> iter =
        compiler.getPageInfo().getTaglibs().iterator(); iter.hasNext();) {

        Object o = iter.next();
        if (!(o instanceof TagLibraryInfoImpl))
            continue;
        TagLibraryInfoImpl tli = (TagLibraryInfoImpl) o;

        ValidationMessage[] errors = tli.validate(xmlView);
        if ((errors != null) && (errors.length != 0)) {
            if (errMsg == null) {
                errMsg = new StringBuilder();
            }
            errMsg.append("<h3>");
            errMsg.append(Localizer.getMessage(
                    "jsp.error.tlv.invalid.page", tli.getShortName(),
                    compiler.getPageInfo().getJspFile()));
            errMsg.append("</h3>");
            for (int i = 0; i < errors.length; i++) {
                if (errors[i] != null) {
                    errMsg.append("<p>");
                    errMsg.append(errors[i].getId());
                    errMsg.append(": ");
                    errMsg.append(errors[i].getMessage());
                    errMsg.append("</p>");
                }
            }
        }
    }

    if (errMsg != null) {
        errDisp.jspError(errMsg.toString());
    }
}
 
源代码28 项目: Tomcat8-Source-Read   文件: JspDocumentParser.java
private Node parseCustomAction(
    String qName,
    String localName,
    String uri,
    Attributes nonTaglibAttrs,
    Attributes nonTaglibXmlnsAttrs,
    Attributes taglibAttrs,
    Mark start,
    Node parent)
    throws SAXException {

    // Check if this is a user-defined (custom) tag
    TagLibraryInfo tagLibInfo = pageInfo.getTaglib(uri);
    if (tagLibInfo == null) {
        return null;
    }

    TagInfo tagInfo = tagLibInfo.getTag(localName);
    TagFileInfo tagFileInfo = tagLibInfo.getTagFile(localName);
    if (tagInfo == null && tagFileInfo == null) {
        throw new SAXParseException(
            Localizer.getMessage("jsp.error.xml.bad_tag", localName, uri),
            locator);
    }
    Class<?> tagHandlerClass = null;
    if (tagInfo != null) {
        String handlerClassName = tagInfo.getTagClassName();
        try {
            tagHandlerClass =
                ctxt.getClassLoader().loadClass(handlerClassName);
        } catch (Exception e) {
            throw new SAXParseException(
                Localizer.getMessage("jsp.error.loadclass.taghandler",
                                     handlerClassName,
                                     qName),
                locator, e);
        }
    }

    String prefix = getPrefix(qName);

    Node.CustomTag ret = null;
    if (tagInfo != null) {
        ret =
            new Node.CustomTag(
                qName,
                prefix,
                localName,
                uri,
                nonTaglibAttrs,
                nonTaglibXmlnsAttrs,
                taglibAttrs,
                start,
                parent,
                tagInfo,
                tagHandlerClass);
    } else {
        ret =
            new Node.CustomTag(
                qName,
                prefix,
                localName,
                uri,
                nonTaglibAttrs,
                nonTaglibXmlnsAttrs,
                taglibAttrs,
                start,
                parent,
                tagFileInfo);
    }

    return ret;
}
 
源代码29 项目: Tomcat8-Source-Read   文件: JspDocumentParser.java
private TagLibraryInfo getTaglibInfo(String prefix, String uri)
    throws JasperException {

    TagLibraryInfo result = null;

    if (uri.startsWith(URN_JSPTAGDIR)) {
        // uri (of the form "urn:jsptagdir:path") references tag file dir
        String tagdir = uri.substring(URN_JSPTAGDIR.length());
        result =
            new ImplicitTagLibraryInfo(
                ctxt,
                parserController,
                pageInfo,
                prefix,
                tagdir,
                err);
    } else {
        // uri references TLD file
        boolean isPlainUri = false;
        if (uri.startsWith(URN_JSPTLD)) {
            // uri is of the form "urn:jsptld:path"
            uri = uri.substring(URN_JSPTLD.length());
        } else {
            isPlainUri = true;
        }

        TldResourcePath tldResourcePath = ctxt.getTldResourcePath(uri);
        if (tldResourcePath != null || !isPlainUri) {
            if (ctxt.getOptions().isCaching()) {
                result = ctxt.getOptions().getCache().get(uri);
            }
            if (result == null) {
                /*
                 * If the uri value is a plain uri, a translation error must
                 * not be generated if the uri is not found in the taglib map.
                 * Instead, any actions in the namespace defined by the uri
                 * value must be treated as uninterpreted.
                 */
                result =
                    new TagLibraryInfoImpl(
                        ctxt,
                        parserController,
                        pageInfo,
                        prefix,
                        uri,
                        tldResourcePath,
                        err);
                if (ctxt.getOptions().isCaching()) {
                    ctxt.getOptions().getCache().put(uri, result);
                }
            }
        }
    }

    return result;
}
 
@Override
public TagLibraryInfo[] getTagLibraryInfos() {
    Collection<TagLibraryInfo> coll = pi.getTaglibs();
    return coll.toArray(new TagLibraryInfo[0]);
}
 
 类所在包
 同包方法