DimDom v0.8.2

org.alltimeflashdreamer.dimdom.websitetester
Class XHTMLProcessorServlet

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

public class XHTMLProcessorServlet
extends AbstractXHTMLServlet

Title: XHTMLProcessorServlet
Description: This servlet fills the DimDom XHTML input with the dynamic values. It is a very basic implementation for the default textarea content. If this content is modified, the behaviour of this class may be strange somehow...

See Also:
Serialized Form

Constructor Summary
XHTMLProcessorServlet()
           
 
Method Summary
 void doPost(HttpServletRequest req, HttpServletResponse res)
          Reads the XHTML string from the URL and passes it to the XHTMLParser class of DimDom.
 
Methods inherited from class org.alltimeflashdreamer.dimdom.websitetester.AbstractXHTMLServlet
doGet, printSite, showErrorSite
 
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

XHTMLProcessorServlet

public XHTMLProcessorServlet()
Method Detail

doPost

public void doPost(HttpServletRequest req,
                   HttpServletResponse res)
            throws ServletException,
                   IOException
Reads the XHTML string from the URL and passes it to the XHTMLParser class of DimDom. If the parser fails to build a Document out of this string, it shows the processed error site. If it succeeds, it fills the success site with the dynamically recognized DimDom-relevant data from the template and allows the user to enter his modification parameters for the processor class.
The various input parameters are read from the DimDom_WebsiteTester.properties file. The method first asks for a servlet parameter named "DimDom_WebsiteTester" (case-sensitive). If this parameter is found, it reads the file mentioned in this parameter, else it tries to read it from the servlet's application directory. If this fails too, an exception is thrown.
Overrides:
doPost in class AbstractXHTMLServlet
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

Copyright (c) 2001/02 by Florian Steinsiepe