freemarker.template
Class TemplateServletUtils

java.lang.Object
  |
  +--freemarker.template.TemplateServletUtils

public class TemplateServletUtils
extends java.lang.Object

A class containing static utility methods to facilitate using templates with servlets.


Constructor Summary
TemplateServletUtils()
           
 
Method Summary
static TemplateModelRoot copyRequest(javax.servlet.ServletRequest req)
          Copies the parameters from a ServletRequest into an empty data model, in a hash called request.
static void copyRequest(javax.servlet.ServletRequest req, TemplateModelRoot modelRoot)
          Copies the parameters from a ServletRequest into a data model, in a hash called request.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TemplateServletUtils

public TemplateServletUtils()
Method Detail

copyRequest

public static void copyRequest(javax.servlet.ServletRequest req,
                               TemplateModelRoot modelRoot)
Copies the parameters from a ServletRequest into a data model, in a hash called request. Single values are stored as SimpleScalars; multiple values are stored as SimpleLists of SimpleScalars.
Parameters:
req - the ServletRequest containing the parameters to be saved.
modelRoot - the root node of the data model.

copyRequest

public static TemplateModelRoot copyRequest(javax.servlet.ServletRequest req)
Copies the parameters from a ServletRequest into an empty data model, in a hash called request. Single values are stored as SimpleScalars; multiple values are stored as SimpleLists of SimpleScalars.
Parameters:
req - the ServletRequest containing the parameters to be saved.
Returns:
the resulting data model.