Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.tiles.freemarker.servlet
Class WebappClassTemplateLoader

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

All Implemented Interfaces:
  freemarker.cache.TemplateLoader

    public class WebappClassTemplateLoader

extends java.lang.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.

Since:
  2.2.1
Version:
  $Rev: 821407 $ $Date: 2009-10-03 22:12:01 +0200 (sab, 03 ott 2009) $

Constructor Summary
`WebappClassTemplateLoader(javax.servlet.ServletContext servletContext)` Constructor.

Method Summary
`void` | `closeTemplateSource(java.lang.Object templateSource)`
`java.lang.Object` | `findTemplateSource(java.lang.String name)`
`long` | `getLastModified(java.lang.Object templateSource)`
`java.io.Reader` | `getReader(java.lang.Object templateSource, java.lang.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 java.lang.Object findTemplateSource(java.lang.String name)
                                        throws java.io.IOException

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

### closeTemplateSource

    public void closeTemplateSource(java.lang.Object templateSource)
                             throws java.io.IOException

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

### getLastModified

    public long getLastModified(java.lang.Object templateSource)

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

### getReader

    public java.io.Reader getReader(java.lang.Object templateSource,
                                    java.lang.String encoding)
                             throws java.io.IOException

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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2010 Apache Software Foundation. All Rights Reserved.