org.dbforms.servlets.base
Class AbstractServletBase

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by org.dbforms.servlets.base.AbstractServletBase
All Implemented Interfaces:
Serializable, Servlet, ServletConfig
Direct Known Subclasses:
AbstractReportServlet, Controller, FileServlet

public abstract class AbstractServletBase
extends HttpServlet

This is the abstract base class for generating reports.

Author:
Henner Kollmann
See Also:
Serialized Form

Constructor Summary
AbstractServletBase()
           
 
Method Summary
 void doGet(HttpServletRequest request, HttpServletResponse response)
          Basic servlet method, answers requests from the browser.
 void doPost(HttpServletRequest request, HttpServletResponse response)
          Basic servlet method, answers requests fromt the browser.
 void init()
          Initialize this servlet.
protected abstract  void process(HttpServletRequest request, HttpServletResponse response)
          generates a report from request.
protected  void sendErrorMessage(String message, HttpServletResponse response)
          Send error messages to the servlet's output stream
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, 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

AbstractServletBase

public AbstractServletBase()
Method Detail

doGet

public final void doGet(HttpServletRequest request,
                        HttpServletResponse response)
                 throws ServletException,
                        IOException
Basic servlet method, answers requests from the browser.

Overrides:
doGet in class HttpServlet
Parameters:
request - HTTPServletRequest
response - HTTPServletResponse
Throws:
ServletException - if there is a servlet problem.
IOException - if there is an I/O problem.

doPost

public final void doPost(HttpServletRequest request,
                         HttpServletResponse response)
                  throws ServletException,
                         IOException
Basic servlet method, answers requests fromt the browser.

Overrides:
doPost in class HttpServlet
Parameters:
request - HTTPServletRequest
response - HTTPServletResponse
Throws:
ServletException - if there is a servlet problem.
IOException - if there is an I/O problem.

process

protected abstract void process(HttpServletRequest request,
                                HttpServletResponse response)
                         throws IOException,
                                ServletException
generates a report from request. Tries to get data from DbForms.

Parameters:
request - HTTPServletRequest
response - HTTPServletResponse
Throws:
IOException
ServletException

init

public void init()
          throws ServletException
Initialize this servlet.

Overrides:
init in class GenericServlet
Throws:
ServletException - if the initialization fails

sendErrorMessage

protected void sendErrorMessage(String message,
                                HttpServletResponse response)
Send error messages to the servlet's output stream

Parameters:
message - the message to display
response - the response object


Copyright © 2002-2006 DbForms. All Rights Reserved.