org.apache.tiles.request.freemarker.servlet

## Class WebappClassTemplateLoader

- java.lang.Object
- - org.apache.tiles.request.freemarker.servlet.WebappClassTemplateLoader

- All Implemented Interfaces:
    freemarker.cache.TemplateLoader

      public class WebappClassTemplateLoader
      extends Object
      implements freemarker.cache.TemplateLoader

  Delegates loading templates using a `WebappTemplateLoader` and, if not found, a `ClassTemplateLoader`. The resources are loaded from the webapp root and from the classpath root.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `WebappClassTemplateLoader(javax.servlet.ServletContext servletContext)` Constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `closeTemplateSource(Object templateSource)`
    `Object` | `findTemplateSource(String name)`
    `long` | `getLastModified(Object templateSource)`
    `Reader` | `getReader(Object templateSource, String encoding)`

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

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

- - ### Constructor Detail

    - #### WebappClassTemplateLoader

          public WebappClassTemplateLoader(javax.servlet.ServletContext servletContext)

      Constructor.
      Parameters:
        `servletContext` - The servlet context.

  - ### Method Detail

    - #### findTemplateSource

          public Object findTemplateSource(String name)
                                    throws IOException

      Specified by:
        `findTemplateSource` in interface `freemarker.cache.TemplateLoader`
      Throws:
        `IOException`

    - #### closeTemplateSource

          public void closeTemplateSource(Object templateSource)
                                   throws IOException

      Specified by:
        `closeTemplateSource` in interface `freemarker.cache.TemplateLoader`
      Throws:
        `IOException`

    - #### getLastModified

          public long getLastModified(Object templateSource)

      Specified by:
        `getLastModified` in interface `freemarker.cache.TemplateLoader`

    - #### getReader

          public Reader getReader(Object templateSource,
                                  String encoding)
                           throws IOException

      Specified by:
        `getReader` in interface `freemarker.cache.TemplateLoader`
      Throws:
        `IOException`

Copyright © 2000–2024 Apache Software Foundation. All rights reserved.