TldCache (Apache Tomcat 9.0.37 API Documentation)

org.apache.jasper.compiler

## Class TldCache

- java.lang.Object
- - org.apache.jasper.compiler.TldCache

-     public class TldCache
      extends Object

  This class caches parsed instances of TLD files to remove the need for the same TLD to be parsed for each JSP that references it. It does not protect against multiple threads processing the same, new TLD but it does ensure that each all threads will use the same TLD object after parsing.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `SERVLET_CONTEXT_ATTRIBUTE_NAME`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TldCache(ServletContext servletContext, Map<String,TldResourcePath> uriTldResourcePathMap, Map<TldResourcePath,TaglibXml> tldResourcePathTaglibXmlMap)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static TldCache` | `getInstance(ServletContext servletContext)`
    `TaglibXml` | `getTaglibXml(TldResourcePath tldResourcePath)`
    `TldResourcePath` | `getTldResourcePath(String uri)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### SERVLET_CONTEXT_ATTRIBUTE_NAME

          public static final String SERVLET_CONTEXT_ATTRIBUTE_NAME

  - ### Constructor Detail

    - #### TldCache

          public TldCache(ServletContext servletContext,
                          Map<String,TldResourcePath> uriTldResourcePathMap,
                          Map<TldResourcePath,TaglibXml> tldResourcePathTaglibXmlMap)

  - ### Method Detail

    - #### getInstance

          public static TldCache getInstance(ServletContext servletContext)

    - #### getTldResourcePath

          public TldResourcePath getTldResourcePath(String uri)

    - #### getTaglibXml

          public TaglibXml getTaglibXml(TldResourcePath tldResourcePath)
                                 throws JasperException

      Throws:
        `JasperException`

Copyright © 2000-2020 Apache Software Foundation. All Rights Reserved.