/** * Return a configured <code>Digester</code> to use for processing * the XML input file, creating a new one if necessary. */ protected synchronized Digester getDigester() { if (digester == null) { digester = new Digester(); digester.setValidating(false); digester.addRuleSet(new MemoryRuleSet()); } return (digester); }
/** * Create the digester which will be used to parse context config files. */ protected static Digester createDigester(String contextClassName) { Digester digester = new Digester(); digester.setValidating(false); // Add object creation rule digester.addObjectCreate("Context", contextClassName, "className"); // Set the properties on that object (it doesn't matter if extra // properties are set) digester.addSetProperties("Context"); return (digester); }
/** * Create the digester which will be used to parse context config files. */ protected static Digester createDigester() { Digester digester = new Digester(); digester.setValidating(false); // Add object creation rule digester.addObjectCreate("Context", "org.apache.catalina.core.StandardContext", "className"); // Set the properties on that object (it doesn't matter if extra // properties are set) digester.addSetProperties("Context"); return (digester); }
/** * Create the digester which will be used to parse context config files. */ protected static Digester createDigester() { Digester digester = new Digester(); digester.setValidating(false); // Add object creation rule digester.addObjectCreate("Context", "org.apache.catalina.core.StandardContext", "className"); // Set the properties on that object (it doesn't matter if extra // properties are set) digester.addSetProperties("Context"); return (digester); }
/** * Create the digester which will be used to parse context config files. */ protected static Digester createDigester() { Digester digester = new Digester(); digester.setValidating(false); // Add object creation rule digester.addObjectCreate("Context", "org.apache.catalina.core.StandardContext", "className"); // Set the properties on that object (it doesn't matter if extra // properties are set) digester.addSetProperties("Context"); return (digester); }
/** * Create the digester which will be used to parse context config files. */ protected static Digester createDigester() { Digester digester = new Digester(); digester.setValidating(false); // Add object creation rule digester.addObjectCreate("Context", "org.apache.catalina.core.StandardContext", "className"); // Set the properties on that object (it doesn't matter if extra // properties are set) digester.addSetProperties("Context"); return (digester); }
/** * Create the digester which will be used to parse context config files. * @param contextClassName The class which will be used to create the * context instance * @return the digester */ protected static Digester createDigester(String contextClassName) { Digester digester = new Digester(); digester.setValidating(false); // Add object creation rule digester.addObjectCreate("Context", contextClassName, "className"); // Set the properties on that object (it doesn't matter if extra // properties are set) digester.addSetProperties("Context"); return digester; }
/** * Create the digester which will be used to parse context config files. */ protected static Digester createDigester() { Digester digester = new Digester(); digester.setValidating(false); // Add object creation rule digester.addObjectCreate("Context", "org.apache.catalina.core.StandardContext", "className"); // Set the properties on that object (it doesn't matter if extra // properties are set) digester.addSetProperties("Context"); return (digester); }
/** * Create the digester which will be used to parse context config files. */ protected static Digester createDigester() { Digester digester = new Digester(); digester.setValidating(false); // Add object creation rule digester.addObjectCreate("Context", "org.apache.catalina.core.StandardContext", "className"); // Set the properties on that object (it doesn't matter if extra // properties are set) digester.addSetProperties("Context"); return (digester); }
/** * Create the digester which will be used to parse context config files. * @param contextClassName The class which will be used to create the * context instance * @return the digester */ protected static Digester createDigester(String contextClassName) { Digester digester = new Digester(); digester.setValidating(false); // Add object creation rule digester.addObjectCreate("Context", contextClassName, "className"); // Set the properties on that object (it doesn't matter if extra // properties are set) digester.addSetProperties("Context"); return digester; }
public static void main(String[] args) throws Exception { BasicConfigurator.configure(); Digester digester = new Digester(); digester.setValidating(false); digester.addRule("sip-app/servlet-mapping/pattern", new TestRule()); digester.parse(new StringReader(TEST)); }
/** * 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<>(); ArrayList<String> attrs = new ArrayList<>(); 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; }
/** * 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); RuleSet contextRuleSet = new ContextRuleSet("", false); digester.addRuleSet(contextRuleSet); RuleSet namingRuleSet = new NamingRuleSet("Context/"); digester.addRuleSet(namingRuleSet); return digester; }
/** * 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; } // END GlassFish 2439
/** * Return a configured <code>Digester</code> to use for processing * the XML input file, creating a new one if necessary. */ protected synchronized Digester getDigester() { if (digester == null) { digester = new Digester(); digester.setValidating(false); try { digester.setFeature( "http://apache.org/xml/features/allow-java-encodings", true); } catch (Exception e) { log.warn(sm.getString("memoryRealm.xmlFeatureEncoding"), e); } digester.addRuleSet(new MemoryRuleSet()); } return (digester); }
/** * Return a configured <code>Digester</code> to use for processing * the XML input file, creating a new one if necessary. */ protected synchronized Digester getDigester() { if (digester == null) { digester = new Digester(); digester.setValidating(false); try { digester.setFeature( "http://apache.org/xml/features/allow-java-encodings", true); } catch (Exception e) { log.warn(sm.getString("memoryRealm.xmlFeatureEncoding"), e); } digester.addRuleSet(new MemoryRuleSet()); } return (digester); }
/** * @return a configured <code>Digester</code> to use for processing * the XML input file, creating a new one if necessary. */ protected synchronized Digester getDigester() { if (digester == null) { digester = new Digester(); digester.setValidating(false); try { digester.setFeature( "http://apache.org/xml/features/allow-java-encodings", true); } catch (Exception e) { log.warn(sm.getString("memoryRealm.xmlFeatureEncoding"), e); } digester.addRuleSet(new MemoryRuleSet()); } return digester; }
/** * Return a configured <code>Digester</code> to use for processing * the XML input file, creating a new one if necessary. */ protected synchronized Digester getDigester() { if (digester == null) { digester = new Digester(); digester.setValidating(false); try { digester.setFeature( "http://apache.org/xml/features/allow-java-encodings", true); } catch (Exception e) { log.warn(sm.getString("memoryRealm.xmlFeatureEncoding"), e); } digester.addRuleSet(new MemoryRuleSet()); } return (digester); }
/** * Create (if necessary) and return a Digester configured to process the * context configuration descriptor for an application. */ protected Digester createDigester() { if (digester == null) { digester = new Digester(); if (host.getDebug() > 0) digester.setDebug(3); digester.setValidating(false); contextRuleSet = new ContextRuleSet(""); digester.addRuleSet(contextRuleSet); namingRuleSet = new NamingRuleSet("Context/"); digester.addRuleSet(namingRuleSet); } return (digester); }
/** * Create a <code>Digester</code> parser. * @param xmlValidation turn on/off xml validation * @param xmlNamespaceAware turn on/off namespace validation * @param rule an instance of <code>RuleSet</code> used for parsing the xml. */ public static Digester newDigester(boolean xmlValidation, boolean xmlNamespaceAware, RuleSet rule) { Digester digester = new Digester(); digester.setNamespaceAware(xmlNamespaceAware); digester.setValidating(xmlValidation); digester.setUseContextClassLoader(true); SchemaResolver schemaResolver = new SchemaResolver(digester); registerLocalSchema(schemaResolver); digester.setEntityResolver(schemaResolver); if ( rule != null ) { digester.addRuleSet(rule); } return (digester); }