org.melati.template.webmacro
Class WebmacroServletTemplateEngine
java.lang.Object
org.melati.template.AbstractTemplateEngine
org.melati.template.webmacro.WebmacroTemplateEngine
org.melati.template.webmacro.WebmacroServletTemplateEngine
- All Implemented Interfaces:
- ServletTemplateEngine, TemplateEngine
public class WebmacroServletTemplateEngine
- extends WebmacroTemplateEngine
- implements ServletTemplateEngine
Wrapper for the WebMacro Template Engine for use in a Servlet context.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.melati.template.TemplateEngine |
addRoot, expandedTemplate, expandTemplate, expandTemplate, getEngine, getName, getRoots, getStringWriter, getTemplateContext, getTemplateName, init, template, templateExtension |
WebmacroServletTemplateEngine
public WebmacroServletTemplateEngine()
- Constructor.
init
public void init(MelatiConfig melatiConfig,
javax.servlet.http.HttpServlet servlet)
throws TemplateEngineException
- Construct a new Engine for use in a servlet environment.
- Specified by:
init
in interface ServletTemplateEngine
- Parameters:
melatiConfig
- a MelatiConfig
servlet
- the servlet we are within
- Throws:
TemplateEngineException
- if any problem occurs with the engine- See Also:
TemplateServlet
getServletTemplateContext
public ServletTemplateContext getServletTemplateContext(Melati melati)
- Get the generic parameters for WebMacro,
with servlet objects in the Context.
- Specified by:
getServletTemplateContext
in interface ServletTemplateEngine
- Parameters:
melati
- the Melati
- Returns:
- a
ServletTemplateContext
getServletWriter
public MelatiWriter getServletWriter(javax.servlet.http.HttpServletResponse response,
boolean buffered)
- Description copied from interface:
ServletTemplateEngine
- Get a Writer which can write to Servlet output.
- Specified by:
getServletWriter
in interface ServletTemplateEngine
- Parameters:
response
- the HttpServletResponse
that this
writer will be part ofbuffered
- whether the writer should be buffered
- Returns:
- a
MelatiWriter
appropriate for this engine.
- Throws:
IOException
- if there is a problem with the filesystem.
Copyright © 2000-2010 PanEris. All Rights Reserved.