org.paneris.melati.site
Class SiteServlet

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.paneris.melati.site.SiteServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
Direct Known Subclasses:
Display

public abstract class SiteServlet
extends org.melati.servlet.TemplateServlet

Author:
timp
See Also:
Serialized Form

Nested Class Summary
static class SiteServlet.Util
          A little something to generate alternating colours.
 
Field Summary
static boolean DEBUG
          Turn on placement of debugging info into context
 
Fields inherited from class org.melati.servlet.TemplateServlet
templateEngine
 
Fields inherited from class org.melati.servlet.ConfigServlet
melatiConfig, sysAdminEmail, sysAdminName
 
Constructor Summary
SiteServlet()
           
 
Method Summary
protected  void doConfiguredRequest(org.melati.Melati melati)
          
protected  java.lang.String doTemplateRequest(org.melati.Melati melati, org.melati.template.ServletTemplateContext context)
          Concrete method for TemplateServlet.
protected  boolean fileAt(java.lang.String filename)
           
 java.lang.String getDB_NAME()
           
protected  java.lang.String getSetting(org.melati.Melati melati, java.lang.String settingName)
           
 java.lang.String getSTATIC_ROOT()
           
protected  org.melati.PoemContext poemContext(org.melati.Melati melati)
          Hardcode the db, rather than using Poem's URL specified LDB.
protected abstract  java.lang.String reallyDoTemplateRequest(org.melati.Melati melati, org.melati.template.ServletTemplateContext templateContext)
          Override this method to build up output in individual servlets.
 
Methods inherited from class org.melati.servlet.TemplateServlet
addExtension, doPoemRequest, error, init, prePoemSession
 
Methods inherited from class org.melati.servlet.PoemServlet
_handleException, dbBusyMessage, destroy, getSysAdminEmail, getSysAdminName, handleException, 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
 

Field Detail

DEBUG

public static final boolean DEBUG
Turn on placement of debugging info into context

See Also:
Constant Field Values
Constructor Detail

SiteServlet

public SiteServlet()
Method Detail

doConfiguredRequest

protected void doConfiguredRequest(org.melati.Melati melati)
                            throws javax.servlet.ServletException,
                                   java.io.IOException

Overrides:
doConfiguredRequest in class org.melati.servlet.PoemServlet
Throws:
javax.servlet.ServletException
java.io.IOException
See Also:
PoemServlet.doConfiguredRequest(org.melati.Melati)

fileAt

protected boolean fileAt(java.lang.String filename)

doTemplateRequest

protected java.lang.String doTemplateRequest(org.melati.Melati melati,
                                             org.melati.template.ServletTemplateContext context)
                                      throws java.lang.Exception
Concrete method for TemplateServlet.

Specified by:
doTemplateRequest in class org.melati.servlet.TemplateServlet
Parameters:
melati -
context -
Returns:
Template name
Throws:
java.lang.Exception

reallyDoTemplateRequest

protected abstract java.lang.String reallyDoTemplateRequest(org.melati.Melati melati,
                                                            org.melati.template.ServletTemplateContext templateContext)
                                                     throws java.lang.Exception
Override this method to build up output in individual servlets.

Returns:
Template name without path or extension
Throws:
java.lang.Exception

getSetting

protected java.lang.String getSetting(org.melati.Melati melati,
                                      java.lang.String settingName)

poemContext

protected org.melati.PoemContext poemContext(org.melati.Melati melati)
                                      throws org.melati.servlet.PathInfoException
Hardcode the db, rather than using Poem's URL specified LDB.

Overrides:
poemContext in class org.melati.servlet.PoemServlet
Throws:
org.melati.servlet.PathInfoException
See Also:
org.melati.servlet.ConfigServlet#melatiContext(org.melati.Melati)

getDB_NAME

public java.lang.String getDB_NAME()
Returns:
Returns the dB_NAME.

getSTATIC_ROOT

public java.lang.String getSTATIC_ROOT()
Returns:
the root


Copyright © 1997-2008 PanEris. All Rights Reserved.