DimDom v0.8.2

org.alltimeflashdreamer.dimdom.websitetester
Class AbstractXHTMLServlet

java.lang.Object
  |
  +--javax.servlet.GenericServlet
        |
        +--javax.servlet.http.HttpServlet
              |
              +--org.alltimeflashdreamer.dimdom.websitetester.AbstractXHTMLServlet
All Implemented Interfaces:
Serializable, Servlet, ServletConfig
Direct Known Subclasses:
XHTMLParserServlet, XHTMLProcessorServlet

abstract class AbstractXHTMLServlet
extends HttpServlet

Title: AbstractXHTMLServlet
Description: This servlet is the superclass of each Website Tester servlet. It collects the common methods and declares the post method abstractly, so that extending servlets implement this method.

See Also:
Serialized Form

Constructor Summary
(package private) AbstractXHTMLServlet()
           
 
Method Summary
 void doGet(HttpServletRequest req, HttpServletResponse res)
          We don't get, we post!
abstract  void doPost(HttpServletRequest req, HttpServletResponse res)
          (abstract declaration, to be implemented by extending classes)
protected  void printSite(HttpServletResponse res, XHTMLSiteData siteData)
          Simply prints the HTML output, generated by the DimDom.print method.
protected  void showErrorSite(int iWhichError, HttpServletResponse res, Exception ex)
          Initializes the appropriate procedure to show the given error to the user.
 
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, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractXHTMLServlet

AbstractXHTMLServlet()
Method Detail

doGet

public void doGet(HttpServletRequest req,
                  HttpServletResponse res)
           throws ServletException,
                  IOException
We don't get, we post!
Overrides:
doGet in class HttpServlet
Parameters:
req - the request object to read URL stuff from
res - the response object to send stuff to
Throws:
ServletException - as defined in the superclass
IOException - as defined in the superclass

doPost

public abstract void doPost(HttpServletRequest req,
                            HttpServletResponse res)
                     throws ServletException,
                            IOException
(abstract declaration, to be implemented by extending classes)
Overrides:
doPost in class HttpServlet
Parameters:
req - the request object to read URL stuff from
res - the response object to send stuff to
Throws:
ServletException - as defined in the superclass
IOException - as defined in the superclass

showErrorSite

protected void showErrorSite(int iWhichError,
                             HttpServletResponse res,
                             Exception ex)
                      throws ServletException,
                             IOException
Initializes the appropriate procedure to show the given error to the user.
Parameters:
iWhichError - id from ErrorSiteProcessor class
res - the response to write to
ex - the exception to show
Throws:
ServletException - if the ErrorSiteProcessor itself catches an exception
IOException - if something with the writing of the output to the client doesn't work

printSite

protected void printSite(HttpServletResponse res,
                         XHTMLSiteData siteData)
                  throws ServletException,
                         IOException
Simply prints the HTML output, generated by the DimDom.print method. If this leads to an exception, the related error error site is shown.
Parameters:
res - the response object to write the output to
siteData - the DimDom command object to process
Throws:
ServletException - if the ErrorSiteProcessor itself catches an exception
IOException - if something with the writing of the output to the client doesn't work

Copyright (c) 2001/02 by Florian Steinsiepe