org.melati.template.webmacro
Class WebmacroMelatiServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by org.melati.servlet.ConfigServlet
              extended by org.melati.servlet.PoemServlet
                  extended by org.melati.servlet.TemplateServlet
                      extended by org.melati.template.webmacro.WebmacroMelatiServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
Direct Known Subclasses:
FlushingServletTest

public abstract class WebmacroMelatiServlet
extends TemplateServlet

Base class to use WebMacro (specifically) with Melati. Extend this class, overriding the handle(Melati, WebContext) method. If you are agnostic as to what TemplateEngine to use then extend TemplateServlet directly.

Author:
Tim Joyce $Revision: 1.18 $
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.melati.servlet.TemplateServlet
templateEngine
 
Fields inherited from class org.melati.servlet.ConfigServlet
melatiConfig, sysAdminEmail, sysAdminName
 
Constructor Summary
WebmacroMelatiServlet()
           
 
Method Summary
protected  java.lang.String doTemplateRequest(Melati m, ServletTemplateContext c)
          Override this method to build up your own output.
protected abstract  java.lang.String handle(Melati m, org.webmacro.servlet.WebContext c)
           
 
Methods inherited from class org.melati.servlet.TemplateServlet
addExtension, doPoemRequest, error, init, prePoemSession
 
Methods inherited from class org.melati.servlet.PoemServlet
_handleException, dbBusyMessage, destroy, doConfiguredRequest, getSysAdminEmail, getSysAdminName, handleException, poemContext, poemContextWithLDB
 
Methods inherited from class org.melati.servlet.ConfigServlet
doGet, doPost, melatiConfig, setSysAdminEmail, setSysAdminName, writeConnectionPendingException, writeError
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebmacroMelatiServlet

public WebmacroMelatiServlet()
Method Detail

doTemplateRequest

protected java.lang.String doTemplateRequest(Melati m,
                                             ServletTemplateContext c)
                                      throws java.lang.Exception
Description copied from class: TemplateServlet
Override this method to build up your own output.

Specified by:
doTemplateRequest in class TemplateServlet
Parameters:
m - the current Melati
c - the current ServletTemplateContext
Returns:
a Template name, possibly excluding extension.
Throws:
java.lang.Exception

handle

protected abstract java.lang.String handle(Melati m,
                                           org.webmacro.servlet.WebContext c)
                                    throws java.lang.Exception
Throws:
java.lang.Exception


Copyright © 2000-2008 PanEris. All Rights Reserved.