use of org.apache.tomcat.util.digester.RuleSet in project tomcat70 by apache.
the class ContextConfig method createContextDigester.
/**
* Create (if necessary) and return a Digester configured to process the
* context configuration descriptor for an application.
*/
protected Digester createContextDigester() {
Digester digester = new Digester();
digester.setValidating(false);
digester.setRulesValidation(true);
HashMap<Class<?>, List<String>> fakeAttributes = new HashMap<Class<?>, List<String>>();
ArrayList<String> attrs = new ArrayList<String>();
attrs.add("className");
fakeAttributes.put(Object.class, attrs);
digester.setFakeAttributes(fakeAttributes);
RuleSet contextRuleSet = new ContextRuleSet("", false);
digester.addRuleSet(contextRuleSet);
RuleSet namingRuleSet = new NamingRuleSet("Context/");
digester.addRuleSet(namingRuleSet);
return digester;
}
use of org.apache.tomcat.util.digester.RuleSet in project tomcat70 by apache.
the class SetParentClassLoaderRule method addClusterRuleSet.
/**
* Cluster support is optional. The JARs may have been removed.
*/
private void addClusterRuleSet(Digester digester, String prefix) {
Class<?> clazz = null;
Constructor<?> constructor = null;
try {
clazz = Class.forName("org.apache.catalina.ha.ClusterRuleSet");
constructor = clazz.getConstructor(String.class);
RuleSet ruleSet = (RuleSet) constructor.newInstance(prefix);
digester.addRuleSet(ruleSet);
} catch (Exception e) {
if (log.isDebugEnabled()) {
log.debug(sm.getString("catalina.noCluster", e.getClass().getName() + ": " + e.getMessage()), e);
} else if (log.isInfoEnabled()) {
log.info(sm.getString("catalina.noCluster", e.getClass().getName() + ": " + e.getMessage()));
}
}
}
use of org.apache.tomcat.util.digester.RuleSet in project Payara by payara.
the class ContextConfig method createContextDigester.
// START GlassFish 2439
/**
* Create and return a Digester configured to process the
* context configuration descriptor for an application.
*/
protected static Digester createContextDigester() {
Digester digester = new Digester();
digester.setValidating(false);
RuleSet contextRuleSet = new ContextRuleSet("", false);
digester.addRuleSet(contextRuleSet);
RuleSet namingRuleSet = new NamingRuleSet("Context/");
digester.addRuleSet(namingRuleSet);
digester.getParser();
return digester;
}
use of org.apache.tomcat.util.digester.RuleSet in project tomcat by apache.
the class SetParentClassLoaderRule method addClusterRuleSet.
/**
* Cluster support is optional. The JARs may have been removed.
*/
private void addClusterRuleSet(Digester digester, String prefix) {
Class<?> clazz = null;
Constructor<?> constructor = null;
try {
clazz = Class.forName("org.apache.catalina.ha.ClusterRuleSet");
constructor = clazz.getConstructor(String.class);
RuleSet ruleSet = (RuleSet) constructor.newInstance(prefix);
digester.addRuleSet(ruleSet);
} catch (Exception e) {
if (log.isDebugEnabled()) {
log.debug(sm.getString("catalina.noCluster", e.getClass().getName() + ": " + e.getMessage()), e);
} else if (log.isInfoEnabled()) {
log.info(sm.getString("catalina.noCluster", e.getClass().getName() + ": " + e.getMessage()));
}
}
}
use of org.apache.tomcat.util.digester.RuleSet in project tomcat by apache.
the class Catalina method addClusterRuleSet.
/**
* Cluster support is optional. The JARs may have been removed.
*/
private void addClusterRuleSet(Digester digester, String prefix) {
Class<?> clazz = null;
Constructor<?> constructor = null;
try {
clazz = Class.forName("org.apache.catalina.ha.ClusterRuleSet");
constructor = clazz.getConstructor(String.class);
RuleSet ruleSet = (RuleSet) constructor.newInstance(prefix);
digester.addRuleSet(ruleSet);
} catch (Exception e) {
if (log.isDebugEnabled()) {
log.debug(sm.getString("catalina.noCluster", e.getClass().getName() + ": " + e.getMessage()), e);
} else if (log.isInfoEnabled()) {
log.info(sm.getString("catalina.noCluster", e.getClass().getName() + ": " + e.getMessage()));
}
}
}
Aggregations