Save This Page
Home » apache-tomcat-6.0.26-src » org.apache » jasper » compiler » [javadoc | source]
org.apache.jasper.compiler
public class: TldLocationsCache [javadoc | source]
java.lang.Object
   org.apache.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
    author: Jan - Luehe
Field Summary
public static final  int ABS_URI    The types of URI one may specify for a tag library 
public static final  int ROOT_REL_URI     
public static final  int NOROOT_REL_URI     
Constructor:
 public TldLocationsCache(ServletContext ctxt) 
 public TldLocationsCache(ServletContext ctxt,
    boolean redeployMode) 
    Constructor.
    Parameters:
    ctxt - the servlet context of the web application in which Jasper is running
    redeployMode - if true, then the compiler will allow redeploying a tag library from the same jar, at the expense of slowing down the server a bit. Note that this may only work on JDK 1.3.1_01a and later, because of JDK bug 4211817 fixed in this release. If redeployMode is false, a faster but less capable mode will be used.
Method from org.apache.jasper.compiler.TldLocationsCache Summary:
getLocation,   setNoTldJars,   uriType
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.jasper.compiler.TldLocationsCache Detail:
 public String[] getLocation(String uri) throws JasperException 
    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).
 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) 
    Returns the type of a URI: ABS_URI ROOT_REL_URI NOROOT_REL_URI