DimDom v0.8.2

org.alltimeflashdreamer.dimdom.websitetester
Class XHTMLParserServlet

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

public class XHTMLParserServlet
extends AbstractXHTMLServlet

Title: XHTMLParserServlet
Description: This servlet parses the XHTML string from URL input and tries to build a Document instance out of it. If this succeeds, the list of recognized DimDomNodes is shown (of course using a DimDom-processed template), else the catched exception's stack trace is shown.

See Also:
Serialized Form

Constructor Summary
XHTMLParserServlet()
           
 
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

XHTMLParserServlet

public XHTMLParserServlet()
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 view the reflection output.
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