Home » freemarker-2.3.13 » freemarker.ext.servlet » [javadoc | source]
freemarker.ext.servlet
public class: AllHttpScopesHashModel [javadoc | source]
java.lang.Object
   freemarker.template.WrappingTemplateModel
      freemarker.template.SimpleHash
         freemarker.ext.servlet.AllHttpScopesHashModel

All Implemented Interfaces:
    Serializable, TemplateHashModelEx

An extension of SimpleHash that looks up keys in the hash, then in the request, session, and servlet context scopes. Makes "Application", "Session" and "Request" keys largely obsolete, however we keep them for backward compatibility (also, "Request" is required for proper operation of JSP taglibs). It is on purpose that we didn't override keys and values methods. That way, only those variables assigned into the hash directly by a subclass of FreemarkerServlet that overrides preTemplateProcess) are discovered as "page" variables by the FM JSP PageContext implementation.
Constructor:
 AllHttpScopesHashModel(ObjectWrapper wrapper,
    ServletContext context,
    HttpServletRequest request) 
Method from freemarker.ext.servlet.AllHttpScopesHashModel Summary:
get,   putUnlistedModel
Methods from freemarker.template.SimpleHash:
copyMap,   get,   isEmpty,   keys,   put,   put,   putAll,   remove,   size,   synchronizedWrapper,   toMap,   toString,   values
Methods from freemarker.template.WrappingTemplateModel:
getDefaultObjectWrapper,   getObjectWrapper,   setDefaultObjectWrapper,   setObjectWrapper,   wrap
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from freemarker.ext.servlet.AllHttpScopesHashModel Detail:
 public TemplateModel get(String key) throws TemplateModelException 
 public  void putUnlistedModel(String key,
    TemplateModel model) 
    Stores a model in the hash so that it doesn't show up in keys() and values() methods. Used to put the Application, Session, Request, RequestParameters and JspTaglibs objects.