Package 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
  Description
  `WebappClassTemplateLoader(jakarta.servlet.ServletContext servletContext)`
  Constructor.

- ## Method Summary

  Modifier and Type
  Method
  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 Details

  - ### WebappClassTemplateLoader

    public WebappClassTemplateLoader(jakarta.servlet.ServletContext servletContext)
    Constructor.
    Parameters:
      `servletContext` - The servlet context.

- ## Method Details

  - ### 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`