public class SharedVariableLoaderFreemarkerServlet
extends freemarker.ext.servlet.FreemarkerServlet
Modifier and Type | Field and Description |
---|---|
static String |
CUSTOM_SHARED_VARIABLE_FACTORIES_INIT_PARAM
The init parameter under which the factories will be put.
|
Constructor and Description |
---|
SharedVariableLoaderFreemarkerServlet() |
Modifier and Type | Method and Description |
---|---|
void |
addSharedVariableFactory(String variableName,
SharedVariableFactory factory)
Adds anew shared variable factory in a manual way.
|
protected freemarker.template.Configuration |
createConfiguration() |
protected freemarker.cache.TemplateLoader |
createTemplateLoader(String templatePath) |
void |
init(ServletConfig config) |
createModel, createObjectWrapper, createRequestParametersHashModel, deduceLocale, doGet, doPost, getConfiguration, getObjectWrapper, getTemplatePath, init, initializeServletContext, initializeSession, postTemplateProcess, preprocessRequest, preTemplateProcess, requestUrlToTemplatePath
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, log, log
public static final String CUSTOM_SHARED_VARIABLE_FACTORIES_INIT_PARAM
public SharedVariableLoaderFreemarkerServlet()
public void init(ServletConfig config) throws ServletException
init
in interface Servlet
init
in class GenericServlet
ServletException
public void addSharedVariableFactory(String variableName, SharedVariableFactory factory)
variableName
- The name of the shared variable.factory
- The shared variable factory.protected freemarker.template.Configuration createConfiguration()
createConfiguration
in class freemarker.ext.servlet.FreemarkerServlet
protected freemarker.cache.TemplateLoader createTemplateLoader(String templatePath)
createTemplateLoader
in class freemarker.ext.servlet.FreemarkerServlet
Copyright © 2001-2017 The Apache Software Foundation. All Rights Reserved.