Top Fields Constructors Methods
org.apache.tomcat.util.descriptor.web

public Class WebXmlParser

extends Object
Class Inheritance
Imports
java.io.IOException, java.net.URL, org.apache.juli.logging.Log, .LogFactory, org.apache.tomcat.util.descriptor.DigesterFactory, .InputSourceUtil, .XmlErrorHandler, org.apache.tomcat.util.digester.Digester, org.apache.tomcat.util.res.StringManager, org.xml.sax.InputSource, .SAXParseException

Field Summary

Modifier and TypeField and Description
private final Log
private static final StringManager
sm

The string resources for this package.

private final Digester
webDigester

The Digester we will use to process web application deployment descriptor files.

private final Digester
webFragmentDigester

The Digester we will use to process web fragment deployment descriptor files.

private final WebRuleSet
private final WebRuleSet

Constructor Summary

AccessConstructor and Description
public
WebXmlParser(boolean namespaceAware, boolean validation, boolean blockExternal)

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

true if the descriptor was successfully parsed
parseWebXml
(URL
the location; if null no load will be attempted
url
,
WebXml
the instance to be populated by the parse operation
dest
,
boolean
indicate if the descriptor is a web-app or web-fragment
fragment
)

Parse a web descriptor at a location.

public boolean
parseWebXml(InputSource source, WebXml dest, boolean fragment)

public void
setClassLoader(ClassLoader
the ClassLoader to be used for creating descriptor objects
classLoader
)

Sets the ClassLoader to be used for creating descriptor objects.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

logback to summary
private final Log log
smback to summary
private static final StringManager sm

The string resources for this package.

webDigesterback to summary
private final Digester webDigester

The Digester we will use to process web application deployment descriptor files.

webFragmentDigesterback to summary
private final Digester webFragmentDigester

The Digester we will use to process web fragment deployment descriptor files.

webFragmentRuleSetback to summary
private final WebRuleSet webFragmentRuleSet
webRuleSetback to summary
private final WebRuleSet webRuleSet

Constructor Detail

WebXmlParserback to summary
public WebXmlParser(boolean namespaceAware, boolean validation, boolean blockExternal)

Method Detail

parseWebXmlback to summary
public boolean parseWebXml(URL url, WebXml dest, boolean fragment) throws IOException

Parse a web descriptor at a location.

Parameters
url:URL

the location; if null no load will be attempted

dest:WebXml

the instance to be populated by the parse operation

fragment:boolean

indicate if the descriptor is a web-app or web-fragment

Returns:boolean

true if the descriptor was successfully parsed

Exceptions
IOException:
if there was a problem reading from the URL
parseWebXmlback to summary
public boolean parseWebXml(InputSource source, WebXml dest, boolean fragment)
setClassLoaderback to summary
public void setClassLoader(ClassLoader classLoader)

Sets the ClassLoader to be used for creating descriptor objects.

Parameters
classLoader:ClassLoader

the ClassLoader to be used for creating descriptor objects