| java.lang.Object com.icesoft.jasper.compiler.TldLocationsCache
TldLocationsCache | public class TldLocationsCache (Code) | | 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 author: Jan Luehe |
Constructor Summary | |
public | TldLocationsCache(ExternalContext ctxt) | public | TldLocationsCache(ExternalContext ctxt, boolean redeployMode) Constructor.
Parameters: ctxt - the servlet context of the web application in whichJasper is running Parameters: redeployMode - if true, then the compiler will allow redeploying atag library from the same jar, at the expense ofslowing down the server a bit. |
Method Summary | |
public String[] | getLocation(String uri) Gets the 'location' of the TLD associated with the given taglib 'uri'.
Returns null if the uri is not associated with any tag library 'exposed'
in the web application. | public static void | setNoTldJars(String jarNames) Sets the list of JARs that are known not to contain any TLDs. | public static int | uriType(String uri) |
ABS_URI | final public static int ABS_URI(Code) | | The types of URI one may specify for a tag library
|
NOROOT_REL_URI | final public static int NOROOT_REL_URI(Code) | | |
ROOT_REL_URI | final public static int ROOT_REL_URI(Code) | | |
TldLocationsCache | public TldLocationsCache(ExternalContext ctxt)(Code) | | |
TldLocationsCache | public TldLocationsCache(ExternalContext ctxt, boolean redeployMode)(Code) | | Constructor.
Parameters: ctxt - the servlet context of the web application in whichJasper is running Parameters: redeployMode - if true, then the compiler will allow redeploying atag library from the same jar, at the expense ofslowing down the server a bit. Note that this mayonly work on JDK 1.3.1_01a and later, because of JDKbug 4211817 fixed in this release. If redeployMode isfalse, a faster but less capable mode will be used. |
getLocation | public String[] getLocation(String uri) throws JasperException(Code) | | Gets the 'location' of the TLD associated with the given taglib 'uri'.
Returns null if the uri is not associated with any tag library 'exposed'
in the web application. A tag library is 'exposed' either explicitly in
web.xml or implicitly via the uri tag in the TLD of a taglib deployed in
a jar file (WEB-INF/lib).
Parameters: uri - The taglib uri An array of two Strings: The first element denotes the real pathto the TLD. If the path to the TLD points to a jar file, then thesecond element denotes the name of the TLD entry in the jar file.Returns null if the uri is not associated with any tag library'exposed' in the web application. |
setNoTldJars | public static void setNoTldJars(String jarNames)(Code) | | Sets the list of JARs that are known not to contain any TLDs.
Parameters: jarNames - List of comma-separated names of JAR files that are knownnot to contain any TLDs |
uriType | public static int uriType(String uri)(Code) | | Returns the type of a URI: ABS_URI ROOT_REL_URI NOROOT_REL_URI
|
|
|