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
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 |
AbstractXHTMLServlet
AbstractXHTMLServlet()
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 fromres
- the response object to send stuff to- Throws:
ServletException
- as defined in the superclassIOException
- 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 fromres
- the response object to send stuff to- Throws:
ServletException
- as defined in the superclassIOException
- 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 classres
- the response to write toex
- the exception to show- Throws:
ServletException
- if the ErrorSiteProcessor itself catches an
exceptionIOException
- 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 tositeData
- the DimDom command object to process- Throws:
ServletException
- if the ErrorSiteProcessor itself catches an
exceptionIOException
- if something with the writing of the output to
the client doesn't work