/** * Initialize with the application's ServletContext. * * @param context the application's servletContext */ public TldScanner(ServletContext context, boolean namespaceAware, boolean validation, boolean blockExternal) { this.context = context; this.tldParser = new TldParser(namespaceAware, validation, blockExternal); }
/** * Initialise with the application's ServletContext. * * @param context the application's servletContext * @param namespaceAware should the XML parser used to parse TLD files be * configured to be name space aware * @param validation should the XML parser used to parse TLD files be * configured to use validation * @param blockExternal should the XML parser used to parse TLD files be * configured to be block references to external * entities */ public TldScanner(ServletContext context, boolean namespaceAware, boolean validation, boolean blockExternal) { this.context = context; this.tldParser = new TldParser(namespaceAware, validation, blockExternal); }
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 = Constants.IS_SECURITY_ENABLED; } else { blockExternal = Boolean.parseBoolean(blockExternalString); } tldParser = new TldParser(true, validate, blockExternal); }
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); }
blockExternal = Boolean.parseBoolean(blockExternalString); TldParser parser = new TldParser(true, validate, new ImplicitTldRuleSet(), blockExternal); taglibXml = parser.parse(resourcePath);
blockExternal = Boolean.parseBoolean(blockExternalString); TldParser parser = new TldParser(true, validate, new ImplicitTldRuleSet(), blockExternal); taglibXml = parser.parse(resourcePath);