public class TldScanner
extends java.lang.Object
| 构造器和说明 |
|---|
TldScanner(javax.servlet.ServletContext context,
boolean namespaceAware,
boolean validation,
boolean blockExternal)
Initialise with the application's ServletContext.
|
| 限定符和类型 | 方法和说明 |
|---|---|
java.util.List<java.lang.String> |
getListeners()
Returns a list of all listeners declared by scanned TLDs.
|
java.util.Map<org.apache.tomcat.util.descriptor.tld.TldResourcePath,org.apache.tomcat.util.descriptor.tld.TaglibXml> |
getTldResourcePathTaglibXmlMap()
Returns the map of TldResourcePath to parsed XML files built by this scanner.
|
java.util.Map<java.lang.String,org.apache.tomcat.util.descriptor.tld.TldResourcePath> |
getUriTldResourcePathMap()
Returns the map of URI to TldResourcePath built by this scanner.
|
protected void |
parseTld(java.lang.String resourcePath) |
protected void |
parseTld(org.apache.tomcat.util.descriptor.tld.TldResourcePath path) |
void |
scan()
Scan for TLDs in all places defined by the specification:
Tag libraries defined by the platform
Entries from <jsp-config> in web.xml
A resources under /WEB-INF
In jar files from /WEB-INF/lib
Additional entries from the container
|
void |
scanJars()
Scan for TLDs in JARs in /WEB-INF/lib.
|
protected void |
scanJspConfig()
Scan for TLDs defined in <jsp-config>.
|
protected void |
scanPlatform()
Scan for TLDs required by the platform specification.
|
protected void |
scanResourcePaths(java.lang.String startPath)
Scan web application resources for TLDs, recursively.
|
void |
setClassLoader(java.lang.ClassLoader classLoader)
Set the class loader used by the digester to create objects as a result of this scan.
|
public TldScanner(javax.servlet.ServletContext context,
boolean namespaceAware,
boolean validation,
boolean blockExternal)
context - the application's servletContextnamespaceAware - should the XML parser used to parse TLD files be configured to be name space awarevalidation - should the XML parser used to parse TLD files be configured to use validationblockExternal - should the XML parser used to parse TLD files be configured to be block references to
external entitiespublic void scan()
throws java.io.IOException,
org.xml.sax.SAXException
java.io.IOException - if there was a problem scanning for or loading a TLDorg.xml.sax.SAXException - if there was a problem parsing a TLDpublic java.util.Map<java.lang.String,org.apache.tomcat.util.descriptor.tld.TldResourcePath> getUriTldResourcePathMap()
public java.util.Map<org.apache.tomcat.util.descriptor.tld.TldResourcePath,org.apache.tomcat.util.descriptor.tld.TaglibXml> getTldResourcePathTaglibXmlMap()
public java.util.List<java.lang.String> getListeners()
public void setClassLoader(java.lang.ClassLoader classLoader)
classLoader - Class loader to use when creating new objects while parsing TLDsprotected void scanPlatform()
protected void scanJspConfig()
throws java.io.IOException,
org.xml.sax.SAXException
java.io.IOException - Error reading resourcesorg.xml.sax.SAXException - XML parsing errorprotected void scanResourcePaths(java.lang.String startPath)
throws java.io.IOException,
org.xml.sax.SAXException
startPath - the directory resource to scanjava.io.IOException - if there was a problem scanning for or loading a TLDorg.xml.sax.SAXException - if there was a problem parsing a TLDpublic void scanJars()
protected void parseTld(java.lang.String resourcePath)
throws java.io.IOException,
org.xml.sax.SAXException
java.io.IOExceptionorg.xml.sax.SAXExceptionprotected void parseTld(org.apache.tomcat.util.descriptor.tld.TldResourcePath path)
throws java.io.IOException,
org.xml.sax.SAXException
java.io.IOExceptionorg.xml.sax.SAXException