Package com.github.jknack.handlebars.io
Class ServletContextTemplateLoader
- java.lang.Object
-
- com.github.jknack.handlebars.io.AbstractTemplateLoader
-
- com.github.jknack.handlebars.io.URLTemplateLoader
-
- com.github.jknack.handlebars.io.ServletContextTemplateLoader
-
- All Implemented Interfaces:
TemplateLoader
public class ServletContextTemplateLoader extends URLTemplateLoader
Load templates from theServletContext
.- Since:
- 0.1.0
-
-
Field Summary
-
Fields inherited from interface com.github.jknack.handlebars.io.TemplateLoader
DEFAULT_PREFIX, DEFAULT_SUFFIX
-
-
Constructor Summary
Constructors Constructor Description ServletContextTemplateLoader(ServletContext servletContext)
Creates a newServletContextTemplateLoader
.ServletContextTemplateLoader(ServletContext servletContext, java.lang.String prefix)
Creates a newServletContextTemplateLoader
.ServletContextTemplateLoader(ServletContext servletContext, java.lang.String prefix, java.lang.String suffix)
Creates a newServletContextTemplateLoader
.
-
Method Summary
-
Methods inherited from class com.github.jknack.handlebars.io.URLTemplateLoader
sourceAt
-
Methods inherited from class com.github.jknack.handlebars.io.AbstractTemplateLoader
getCharset, getPrefix, getSuffix, resolve, setCharset, setPrefix, setSuffix
-
-
-
-
Constructor Detail
-
ServletContextTemplateLoader
public ServletContextTemplateLoader(ServletContext servletContext, java.lang.String prefix, java.lang.String suffix)
Creates a newServletContextTemplateLoader
.- Parameters:
servletContext
- The servlet context. Required.prefix
- The prefix that gets prepended to view names when building a URI.suffix
- The suffix that gets appended to view names when building a URI. Required.
-
ServletContextTemplateLoader
public ServletContextTemplateLoader(ServletContext servletContext, java.lang.String prefix)
Creates a newServletContextTemplateLoader
.- Parameters:
servletContext
- The servlet context. Required.prefix
- The prefix that gets prepended to view names when building a URI.
-
ServletContextTemplateLoader
public ServletContextTemplateLoader(ServletContext servletContext)
Creates a newServletContextTemplateLoader
.- Parameters:
servletContext
- The servlet context. Required.
-
-