Class TldResourcePath
java.lang.Object
org.apache.tomcat.util.descriptor.tld.TldResourcePath
A TLD Resource Path as defined in JSP 7.3.2.
This encapsulates references to Tag Library Descriptors that can be located in different places:
- As resources within an application
- As entries in JAR files included in the application
- As resources provided by the container
META-INF/taglib.tld
. Such a mapping must be explicitly converted
to a URL and entryName when using this implementation.-
Constructor Summary
ConstructorDescriptionTldResourcePath
(URL url, String webappPath) Constructor identifying a TLD resource directly.TldResourcePath
(URL url, String webappPath, String entryName) Constructor identifying a TLD packaged within a JAR file. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns the name of the JAR entry that contains the TLD.getUrl()
Returns the URL of the TLD or of the JAR containing the TLD.Returns the path within the web application, if any, that the resource returned bygetUrl()
was obtained from.int
hashCode()
openJar()
Opens a stream to access the TLD.Return the external form of the URL representing this TLD.
-
Constructor Details
-
TldResourcePath
Constructor identifying a TLD resource directly.- Parameters:
url
- the location of the TLDwebappPath
- the web application path, if any, of the TLD
-
TldResourcePath
Constructor identifying a TLD packaged within a JAR file.- Parameters:
url
- the location of the JARwebappPath
- the web application path, if any, of the JARentryName
- the name of the entry in the JAR
-
-
Method Details
-
getUrl
Returns the URL of the TLD or of the JAR containing the TLD.- Returns:
- the URL of the TLD
-
getWebappPath
Returns the path within the web application, if any, that the resource returned bygetUrl()
was obtained from.- Returns:
- the web application path or @null if the the resource is not located within a web application
-
getEntryName
Returns the name of the JAR entry that contains the TLD. May be null to indicate the URL refers directly to the TLD itself.- Returns:
- the name of the JAR entry that contains the TLD
-
toExternalForm
Return the external form of the URL representing this TLD. This can be used as a canonical location for the TLD itself, for example, as the systemId to use when parsing its XML.- Returns:
- the external form of the URL representing this TLD
-
openStream
Opens a stream to access the TLD.- Returns:
- a stream containing the TLD content
- Throws:
IOException
- if there was a problem opening the stream
-
openJar
- Throws:
IOException
-
equals
-
hashCode
public int hashCode()
-