You can configure the location of your templates with the context param 'freemarker.template.path'. If not assigned we'll use a default of WEB-INF/templates. Note that this uses Freemarker's {@link freemarker.cache.WebappTemplateLoader} to load/cache the templates, socheck its docs (or crank up the logging under the 'freemarker.cache' package) if your templates aren't getting loaded.
This will put your Viewable's model object in the template variable "it", unless the model is a Map. If so, the values will be assigned to the template assuming the map is of type Map<String,Object>.
There are a number of methods you can override to change the behavior, such as handling processing exceptions, changing the default template extension, or adding variables to be assigned to every template context.
@author Chris Winters
|
|