freemarker.ext.servlet
Class ServletContextHashModel
java.lang.Object
freemarker.ext.servlet.ServletContextHashModel
- TemplateHashModel, TemplateModel
public final class ServletContextHashModel
extends java.lang.Object
TemplateHashModel wrapper for a ServletContext attributes.
$Id: ServletContextHashModel.java,v 1.12 2003/01/12 23:40:14 revusky Exp $
ServletContextHashModel
public ServletContextHashModel(GenericServlet servlet,
ObjectWrapper wrapper)
get
public TemplateModel get(String key)
throws TemplateModelException
Gets a TemplateModel from the hash.
- get in interface TemplateHashModel
key
- the name by which the TemplateModel
is identified in the template.
- the TemplateModel referred to by the key,
or null if not found.
getServlet
public GenericServlet getServlet()
Returns the underlying servlet. Can return null if this object was
created using the deprecated constructor.