winstone
Class WebXmlParser
java.lang.Object
winstone.WebXmlParser
- All Implemented Interfaces:
- org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler
public class WebXmlParser
- extends java.lang.Object
- implements org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler
The web.xml parsing logic. This is used by more than one launcher, so it's shared from here.
- Version:
- $Id: WebXmlParser.java,v 1.9 2006/12/08 04:08:44 rickknowles Exp $
- Author:
- Rick Knowles
Constructor Summary |
WebXmlParser(java.lang.ClassLoader commonCL)
|
Method Summary |
void |
error(org.xml.sax.SAXParseException exception)
|
void |
fatalError(org.xml.sax.SAXParseException exception)
|
protected org.w3c.dom.Document |
parseStreamToXML(java.io.File webXmlFile)
Get a parsed XML DOM from the given inputstream. |
org.xml.sax.InputSource |
resolveEntity(java.lang.String publicName,
java.lang.String url)
Implements the EntityResolver interface. |
void |
warning(org.xml.sax.SAXParseException exception)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WebXmlParser
public WebXmlParser(java.lang.ClassLoader commonCL)
parseStreamToXML
protected org.w3c.dom.Document parseStreamToXML(java.io.File webXmlFile)
- Get a parsed XML DOM from the given inputstream. Used to process the
web.xml application deployment descriptors. Returns null if the parse fails,
so the effect is as if there was no web.xml file available.
resolveEntity
public org.xml.sax.InputSource resolveEntity(java.lang.String publicName,
java.lang.String url)
throws org.xml.sax.SAXException,
java.io.IOException
- Implements the EntityResolver interface. This allows us to redirect any
requests by the parser for webapp DTDs to local copies. It's faster and
it means you can run winstone without being web-connected.
- Specified by:
resolveEntity
in interface org.xml.sax.EntityResolver
- Throws:
org.xml.sax.SAXException
java.io.IOException
error
public void error(org.xml.sax.SAXParseException exception)
throws org.xml.sax.SAXException
- Specified by:
error
in interface org.xml.sax.ErrorHandler
- Throws:
org.xml.sax.SAXException
fatalError
public void fatalError(org.xml.sax.SAXParseException exception)
throws org.xml.sax.SAXException
- Specified by:
fatalError
in interface org.xml.sax.ErrorHandler
- Throws:
org.xml.sax.SAXException
warning
public void warning(org.xml.sax.SAXParseException exception)
throws org.xml.sax.SAXException
- Specified by:
warning
in interface org.xml.sax.ErrorHandler
- Throws:
org.xml.sax.SAXException
Copyright © 2013. All Rights Reserved.