![]() The Configuration must contain mutable information like the theme directory and the TemplateLoader. It must also be request-specific so it can have the correct Locale for language support. But we should only have one instance, so there is only one TemplateCache (alternatively, one TemplateCache per theme). Previously, this was addressed by intercepting the Template processing and adding the request-based info to the Environment. However, this interception code needed to appear each time a Template was processed. This was sometimes overlooked, and at best introduced a bunch of duplicated code. Instead, I extended the freemarker Configuration class to include a ThreadLocal that holds request-specific information. |
||
---|---|---|
.. | ||
filegraph/tbox | ||
ontologies | ||
resources | ||
tlds | ||
dwr.xml | ||
web.xml |