當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。