## Uses of Class
freemarker.template.Configuration

Packages that use Configuration
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` (see also the Getting Stared in the Manual.)

### Uses of Configuration in freemarker.cache

Methods in freemarker.cache that return Configuration
`Configuration` TemplateConfigurationFactory.`getConfiguration()` Returns the configuration this object belongs to, or `null` if it isn't yet bound to a `Configuration`.

Methods in freemarker.cache with parameters of type Configuration
`void` TemplateConfigurationFactory.`setConfiguration(Configuration cfg)` Binds this `TemplateConfigurationFactory` to a `Configuration`.
`void` TemplateCache.`setConfiguration(Configuration config)` Deprecated. Use the `TemplateCache.TemplateCache(TemplateLoader, CacheStorage, Configuration)` constructor.
`protected abstract void` TemplateConfigurationFactory.`setConfigurationOfChildren(Configuration cfg)` Calls `TemplateConfiguration.setParentConfiguration(Configuration)` on each enclosed `TemplateConfiguration` and `TemplateConfigurationFactory.setConfiguration(Configuration)` on each enclosed `TemplateConfigurationFactory` objects.
`protected void` MergingTemplateConfigurationFactory.`setConfigurationOfChildren(Configuration cfg)`
`protected void` FirstMatchTemplateConfigurationFactory.`setConfigurationOfChildren(Configuration cfg)`
`protected void` ConditionalTemplateConfigurationFactory.`setConfigurationOfChildren(Configuration cfg)`

Constructors in freemarker.cache with parameters of type Configuration
Constructor and Description
`TemplateCache(TemplateLoader templateLoader, CacheStorage cacheStorage, Configuration config)` Same as `TemplateCache.TemplateCache(TemplateLoader, CacheStorage, TemplateLookupStrategy, TemplateNameFormat, Configuration)` with `TemplateLookupStrategy.DEFAULT_2_3_0` and `TemplateNameFormat.DEFAULT_2_3_0`.
`TemplateCache(TemplateLoader templateLoader, CacheStorage cacheStorage, TemplateLookupStrategy templateLookupStrategy, TemplateNameFormat templateNameFormat, Configuration config)` Same as `TemplateCache.TemplateCache(TemplateLoader, CacheStorage, TemplateLookupStrategy, TemplateNameFormat, TemplateConfigurationFactory, Configuration)` with `null` for `templateConfigurations`-s.
`TemplateCache(TemplateLoader templateLoader, CacheStorage cacheStorage, TemplateLookupStrategy templateLookupStrategy, TemplateNameFormat templateNameFormat, TemplateConfigurationFactory templateConfigurations, Configuration config)`
`TemplateCache(TemplateLoader templateLoader, Configuration config)` Same as `TemplateCache.TemplateCache(TemplateLoader, CacheStorage, Configuration)` with a new `SoftCacheStorage` as the 2nd parameter.

### Uses of Configuration in freemarker.core

Methods in freemarker.core that return Configuration
`Configuration` Environment.`getConfiguration()`
`Configuration` TemplateConfiguration.`getParentConfiguration()` Returns the parent `Configuration`, or `null` if none was associated yet.

Methods in freemarker.core with parameters of type Configuration
`Object` CustomAttribute.`get(Configuration cfg)` Gets the value of a `Configuration`-scope attribute from the given `Configuration`.
`void` CustomAttribute.`set(Object value, Configuration cfg)` Sets the value of a `Configuration`-scope attribute in the given `Configuration`.
`void` TemplateConfiguration.`setParentConfiguration(Configuration cfg)` Associates this instance with a `Configuration`; usually you don't call this, as it's called internally when this instance is added to a `Configuration`.

### Uses of Configuration in freemarker.ext.servlet

Methods in freemarker.ext.servlet that return Configuration
`protected Configuration` FreemarkerServlet.`createConfiguration()` Creates the FreeMarker `Configuration` singleton and (when overidden) maybe sets its defaults.
`protected Configuration` FreemarkerServlet.`getConfiguration()` Returns the `Configuration` object used by this servlet.

### Uses of Configuration in freemarker.template

Methods in freemarker.template that return Configuration
`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.

Methods in freemarker.template with parameters of type Configuration
`static Template` Template.`getPlainTextTemplate(String name, String content, Configuration config)` Same as `Template.getPlainTextTemplate(String, String, String, Configuration)` with `null` `sourceName` argument.
`static Template` Template.`getPlainTextTemplate(String name, String sourceName, String content, Configuration config)` Creates (not "get"-s) a `Template` that only contains a single block of static 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...`.

Constructors in freemarker.template with parameters of type Configuration
Constructor and Description
`Template(String name, Reader reader, Configuration cfg)` Same as `Template.Template(String, String, Reader, Configuration)` with `null` `sourceName` parameter.
`Template(String name, Reader reader, Configuration cfg, String encoding)` Deprecated. In most applications, use `Template.Template(String, Reader, Configuration)` instead, which doesn't specify the encoding.
`Template(String name, String sourceCode, Configuration cfg)` Convenience constructor for `Template(name, new StringReader(reader), cfg)`.
`Template(String name, String sourceName, Reader reader, Configuration cfg)` Constructs a template from a character stream.
`Template(String name, String sourceName, Reader reader, Configuration cfg, ParserConfiguration customParserConfiguration, String encoding)` Same as `Template.Template(String, String, Reader, Configuration, String)`, but also specifies a `TemplateConfiguration`.
`Template(String name, String sourceName, Reader reader, Configuration cfg, String encoding)` Deprecated. In most applications, use `Template.Template(String, String, Reader, Configuration)` instead, which doesn't specify the encoding.