当前位置: 首页>>代码示例>>Java>>正文


Java TaglibXml类代码示例

本文整理汇总了Java中org.apache.tomcat.util.descriptor.tld.TaglibXml的典型用法代码示例。如果您正苦于以下问题:Java TaglibXml类的具体用法?Java TaglibXml怎么用?Java TaglibXml使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


TaglibXml类属于org.apache.tomcat.util.descriptor.tld包,在下文中一共展示了TaglibXml类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: parseTld

import org.apache.tomcat.util.descriptor.tld.TaglibXml; //导入依赖的package包/类
protected void parseTld(TldResourcePath path) throws IOException, SAXException {
    if (tldResourcePathTaglibXmlMap.containsKey(path)) {
        // TLD has already been parsed as a result of processing web.xml
        return;
    }
    TaglibXml tld = tldParser.parse(path);
    String uri = tld.getUri();
    if (uri != null) {
        if (!uriTldResourcePathMap.containsKey(uri)) {
            uriTldResourcePathMap.put(uri, path);
        }
    }
    tldResourcePathTaglibXmlMap.put(path, tld);
    if (tld.getListeners() != null) {
        listeners.addAll(tld.getListeners());
    }
}
 
开发者ID:nkasvosve,项目名称:beyondj,代码行数:18,代码来源:TldScanner.java

示例2: TldCache

import org.apache.tomcat.util.descriptor.tld.TaglibXml; //导入依赖的package包/类
public TldCache(ServletContext servletContext,
        Map<String, TldResourcePath> uriTldResourcePathMap,
        Map<TldResourcePath, TaglibXml> tldResourcePathTaglibXmlMap) {
    this.servletContext = servletContext;
    this.uriTldResourcePathMap.putAll(uriTldResourcePathMap);
    for (Entry<TldResourcePath, TaglibXml> entry : tldResourcePathTaglibXmlMap.entrySet()) {
        TldResourcePath tldResourcePath = entry.getKey();
        long lastModified[] = getLastModified(tldResourcePath);
        TaglibXmlCacheEntry cacheEntry = new TaglibXmlCacheEntry(
                entry.getValue(), lastModified[0], lastModified[1]);
        this.tldResourcePathTaglibXmlMap.put(tldResourcePath, cacheEntry);
    }
    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 = true;
    } else {
        blockExternal = Boolean.parseBoolean(blockExternalString);
    }
    tldParser = new TldParser(true, validate, blockExternal);
}
 
开发者ID:nkasvosve,项目名称:beyondj,代码行数:25,代码来源:TldCache.java

示例3: getTaglibXml

import org.apache.tomcat.util.descriptor.tld.TaglibXml; //导入依赖的package包/类
public TaglibXml getTaglibXml(TldResourcePath tldResourcePath) throws JasperException {
    TaglibXmlCacheEntry cacheEntry = tldResourcePathTaglibXmlMap.get(tldResourcePath);
    long lastModified[] = getLastModified(tldResourcePath);
    if (lastModified[0] != cacheEntry.getWebAppPathLastModified() ||
            lastModified[1] != cacheEntry.getEntryLastModified()) {
        synchronized (cacheEntry) {
            if (lastModified[0] != cacheEntry.getWebAppPathLastModified() ||
                    lastModified[1] != cacheEntry.getEntryLastModified()) {
                // Re-parse TLD
                TaglibXml updatedTaglibXml;
                try {
                    updatedTaglibXml = tldParser.parse(tldResourcePath);
                } catch (IOException | SAXException e) {
                    throw new JasperException(e);
                }
                cacheEntry.setTaglibXml(updatedTaglibXml);
                cacheEntry.setWebAppPathLastModified(lastModified[0]);
                cacheEntry.setEntryLastModified(lastModified[1]);
            }
        }
    }
    return cacheEntry.getTaglibXml();
}
 
开发者ID:nkasvosve,项目名称:beyondj,代码行数:24,代码来源:TldCache.java

示例4: scanPlatform

import org.apache.tomcat.util.descriptor.tld.TaglibXml; //导入依赖的package包/类
@Override
protected void scanPlatform() {
    super.scanPlatform();
    if (URLClassLoaderFirst.shouldSkipJsf(Thread.currentThread().getContextClassLoader(), "javax.faces.FactoryFinder")) {
        uriTldResourcePathMapParent.putAll(URI_TLD_RESOURCE);
        tldResourcePathTaglibXmlMapParent.putAll(TLD_RESOURCE_TAG_LIB);
    } else { // exclude myfaces
        for (final Map.Entry<String, TldResourcePath> entry : URI_TLD_RESOURCE.entrySet()) {
            final TldResourcePath path = entry.getValue();
            if (path.getUrl() != MYFACES_URL) { // ref works
                uriTldResourcePathMapParent.put(entry.getKey(), path);
                final TaglibXml tl = TLD_RESOURCE_TAG_LIB.get(path);
                if (tl != null) {
                    tldResourcePathTaglibXmlMapParent.put(path, tl);
                }
            }
        }
    }
}
 
开发者ID:apache,项目名称:tomee,代码行数:20,代码来源:TomEETldScanner.java

示例5: TaglibXmlCacheEntry

import org.apache.tomcat.util.descriptor.tld.TaglibXml; //导入依赖的package包/类
public TaglibXmlCacheEntry(TaglibXml taglibXml, long webAppPathLastModified,
        long entryLastModified) {
    this.taglibXml = taglibXml;
    this.webAppPathLastModified = webAppPathLastModified;
    this.entryLastModified = entryLastModified;
}
 
开发者ID:nkasvosve,项目名称:beyondj,代码行数:7,代码来源:TldCache.java

示例6: setTaglibXml

import org.apache.tomcat.util.descriptor.tld.TaglibXml; //导入依赖的package包/类
public void setTaglibXml(TaglibXml taglibXml) {
    this.taglibXml = taglibXml;
}
 
开发者ID:nkasvosve,项目名称:beyondj,代码行数:4,代码来源:TldCache.java

示例7: TomEETldScanner

import org.apache.tomcat.util.descriptor.tld.TaglibXml; //导入依赖的package包/类
public TomEETldScanner(final ServletContext context, final boolean namespaceAware, final boolean validate, final boolean blockExternal) {
    super(context, namespaceAware, validate, blockExternal);
    uriTldResourcePathMapParent = (Map<String, TldResourcePath>) Reflections.get(this, "uriTldResourcePathMap");
    tldResourcePathTaglibXmlMapParent = (Map<TldResourcePath, TaglibXml>) Reflections.get(this, "tldResourcePathTaglibXmlMap");
    // we don't care about listeners since we add it ourself
}
 
开发者ID:apache,项目名称:tomee,代码行数:7,代码来源:TomEETldScanner.java

示例8: TckTlds

import org.apache.tomcat.util.descriptor.tld.TaglibXml; //导入依赖的package包/类
public TckTlds(final ServletContext context) {
    super(context,
            (Map<String, TldResourcePath>) Reflections.get(SCANNER, "uriTldResourcePathMap"),
            (Map<TldResourcePath, TaglibXml>) Reflections.get(SCANNER, "tldResourcePathTaglibXmlMap"));
}
 
开发者ID:apache,项目名称:tomee,代码行数:6,代码来源:TckTlds.java

示例9: getTldResourcePathTaglibXmlMap

import org.apache.tomcat.util.descriptor.tld.TaglibXml; //导入依赖的package包/类
/**
 * Returns the map of TldResourcePath to parsed XML files built by this
 * scanner.
 *
 * @return the map of TldResourcePath to parsed XML files
 */
public Map<TldResourcePath,TaglibXml> getTldResourcePathTaglibXmlMap() {
    return tldResourcePathTaglibXmlMap;
}
 
开发者ID:nkasvosve,项目名称:beyondj,代码行数:10,代码来源:TldScanner.java


注:本文中的org.apache.tomcat.util.descriptor.tld.TaglibXml类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。