public class WebXmlUtils extends Object
Constructor and Description |
---|
WebXmlUtils() |
Modifier and Type | Method and Description |
---|---|
static org.dom4j.Document |
asDocument(File webXML) |
static String |
getFilterClassName(org.dom4j.Document webXml,
String filterName)
Retrieves the class name for a particular filter from a web.xml document.
|
static Map<String,String> |
getFilterInitParams(org.dom4j.Document webXml,
String filterName)
Retrieves a map of init param/values for a particular filter from a web.xml document.
|
static List<String> |
getFilterNames(org.dom4j.Document webXml)
Retrieves the names of all filters from a web.xml document.
|
static Set<String> |
getFilterUrlPatterns(org.dom4j.Document webXml,
String filterName)
Retrieves all URL patterns that apply to a specific filter.
|
static String |
getServletClassName(org.dom4j.Document webXml,
String servletName)
Retrieves the class name for a particular servlet from a web.xml document.
|
static Map<String,String> |
getServletInitParams(org.dom4j.Document webXml,
String servletName)
Retrieves a map of init param/values for a particular servlet from a web.xml document.
|
static List<String> |
getServletNames(org.dom4j.Document webXml)
Retrieves the names of all servlets from a web.xml document.
|
static Set<String> |
getServletUrlPatterns(org.dom4j.Document webXml,
String servletName)
Retrieves all URL patterns that apply to a specific servlet.
|
public static org.dom4j.Document asDocument(File webXML) throws org.dom4j.DocumentException
org.dom4j.DocumentException
public static List<String> getServletNames(org.dom4j.Document webXml)
webXml
- web.xml document, parsed as XML (cannot be null)public static List<String> getFilterNames(org.dom4j.Document webXml)
webXml
- web.xml document, parsed as XML (cannot be null)public static String getServletClassName(org.dom4j.Document webXml, String servletName)
webXml
- web.xml document, parsed as XML (cannot be null)servletName
- The name of the servlet (cannot be null or empty).public static String getFilterClassName(org.dom4j.Document webXml, String filterName)
webXml
- web.xml document, parsed as XML (cannot be null)filterName
- The name of the filter (cannot be null or empty).public static Map<String,String> getServletInitParams(org.dom4j.Document webXml, String servletName)
webXml
- web.xml document, parsed as XML (cannot be null)servletName
- The name of the servlet (cannot be null or empty).public static Map<String,String> getFilterInitParams(org.dom4j.Document webXml, String filterName)
webXml
- web.xml document, parsed as XML (cannot be null)filterName
- The name of the filter (cannot be null or empty).public static Set<String> getServletUrlPatterns(org.dom4j.Document webXml, String servletName)
webXml
- web.xml document, parsed as XML (cannot be null)servletName
- The name of the servlet (cannot be null or empty).public static Set<String> getFilterUrlPatterns(org.dom4j.Document webXml, String filterName)
webXml
- web.xml document, parsed as XML (cannot be null)filterName
- The name of the filter (cannot be null or empty).Copyright © 2003–2020 Ignite Realtime. All rights reserved.