Package | Description |
---|---|
freemarker.cache |
Template loading and caching.
|
freemarker.core |
The seldom used or advanced parts of the fundamental FreeMarker API, compared to
freemarker.template . |
freemarker.ext.servlet |
Servlet for legacy "Model 2" frameworks that allows using FreeMarker
templates instead of JSP as the MVC View
(see in the Manual).
|
freemarker.template |
The fundamental, most commonly used API-s of FreeMarker;
start with
Configuration (also see
Getting Stared in the Manual.) |
Modifier and Type | Method and Description |
---|---|
void |
TemplateCache.setConfiguration(Configuration config)
Sets the configuration object to which this cache belongs.
|
Modifier and Type | Method and Description |
---|---|
Configuration |
Environment.getConfiguration() |
Modifier and Type | Method and Description |
---|---|
protected Configuration |
FreemarkerServlet.createConfiguration()
This method is called from
FreemarkerServlet.init() to create the
FreeMarker configuration object that this servlet will use
for template loading. |
protected Configuration |
FreemarkerServlet.getConfiguration()
Returns the
Configuration object used by this servlet. |
Modifier and Type | Method and Description |
---|---|
Configuration |
Template.getConfiguration()
Returns the Configuration object associated with this template.
|
static Configuration |
Configuration.getDefaultConfiguration()
Deprecated.
The usage of the static singleton (the "default")
Configuration instance can easily cause erroneous, unpredictable
behavior. This is because multiple independent software components may use
FreeMarker internally inside the same application, so they will interfere
because of the common Configuration instance. Each such component
should use its own private Configuration object instead, that it
typically creates with new Configuration() when the component
is initialized. |
Modifier and Type | Method and Description |
---|---|
static Template |
Template.getPlainTextTemplate(java.lang.String name,
java.lang.String content,
Configuration config)
Returns a trivial template, one that is just a single block of
plain text, no dynamic content.
|
static void |
Configuration.setDefaultConfiguration(Configuration config)
Deprecated.
Using the "default"
Configuration instance can
easily lead to erroneous, unpredictable behaviour.
See more here... . |
Constructor and Description |
---|
Template(java.lang.String name,
java.io.Reader reader,
Configuration cfg)
Constructs a template from a character stream.
|
Template(java.lang.String name,
java.io.Reader reader,
Configuration cfg,
java.lang.String encoding)
Deprecated.
Use
Template.Template(String, Reader, Configuration) instead. |
Template(java.lang.String name,
java.lang.String sourceCode,
Configuration cfg)
Convenience constructor for
Template(name, new StringReader(reader), cfg) . |