Class TldLocationsCache
java.lang.Object
org.apache.sling.scripting.jsp.jasper.compiler.TldLocationsCache
A container for all tag libraries that are defined "globally"
for the web application.
Tag Libraries can be defined globally in one of two ways:
1. Via elements in web.xml:
the uri and location of the tag-library are specified in
the element.
2. Via packaged jar files that contain .tld files
within the META-INF directory, or some subdirectory
of it. The taglib is 'global' if it has the
element defined.
A mapping between the taglib URI and its associated TaglibraryInfoImpl
is maintained in this container.
Actually, that's what we'd like to do. However, because of the
way the classes TagLibraryInfo and TagInfo have been defined,
it is not currently possible to share an instance of TagLibraryInfo
across page invocations. A bug has been submitted to the spec lead.
In the mean time, all we do is save the 'location' where the
TLD associated with a taglib URI can be found.
When a JSP page has a taglib directive, the mappings in this container
are first searched (see method getLocation()).
If a mapping is found, then the location of the TLD is returned.
If no mapping is found, then the uri specified
in the taglib directive is to be interpreted as the location for
the TLD of this tag library.
- Author:
- Pierre Delisle, Jan Luehe
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
The types of URI one may specify for a tag librarystatic final int
static final int
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract String[]
getLocation
(String uri) abstract URL
getTldLocationURL
(String tldLocation) static int
Returns the type of a URI: ABS_URI ROOT_REL_URI NOROOT_REL_URI
-
Field Details
-
ABS_URI
public static final int ABS_URIThe types of URI one may specify for a tag library- See Also:
-
ROOT_REL_URI
public static final int ROOT_REL_URI- See Also:
-
NOROOT_REL_URI
public static final int NOROOT_REL_URI- See Also:
-
-
Constructor Details
-
TldLocationsCache
public TldLocationsCache()
-
-
Method Details
-
getLocation
- Throws:
JasperException
-
getTldLocationURL
-
uriType
Returns the type of a URI: ABS_URI ROOT_REL_URI NOROOT_REL_URI
-