Java Code Examples for org.apache.tomcat.util.digester.Digester#getParser()

The following examples show how to use org.apache.tomcat.util.digester.Digester#getParser() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ContextConfig.java    From Tomcat7.0.67 with Apache License 2.0 6 votes vote down vote up
/**
 * Process a "init" event for this Context.
 */
protected void init() {
    // Called from StandardContext.init()

    Digester contextDigester = createContextDigester();
    contextDigester.getParser();

    if (log.isDebugEnabled())
        log.debug(sm.getString("contextConfig.init"));
    context.setConfigured(false);
    ok = true;

    contextConfig(contextDigester);

    createWebXmlDigester(context.getXmlNamespaceAware(),
            context.getXmlValidation());
}
 
Example 2
Source File: TldConfig.java    From Tomcat7.0.67 with Apache License 2.0 6 votes vote down vote up
/**
 * Create (if necessary) and return a Digester configured to process the
 * tld.
 */
private static synchronized Digester createTldDigester(boolean validation,
        boolean blockExternal) {

    Digester digester;
    int cacheIndex = 0;
    if (validation) {
        cacheIndex += 1;
    }
    if (blockExternal) {
        cacheIndex += 2;
    }
    digester = tldDigesters[cacheIndex];
    if (digester == null) {
        digester = DigesterFactory.newDigester(validation,
                true, new TldRuleSet(), blockExternal);
        digester.getParser();
        tldDigesters[cacheIndex] = digester;
    }
    return digester;
}
 
Example 3
Source File: ContextConfig.java    From tomcatsrc with Apache License 2.0 6 votes vote down vote up
/**
 * Process a "init" event for this Context.
 */
protected void init() {
    // Called from StandardContext.init()

    Digester contextDigester = createContextDigester();
    contextDigester.getParser();

    if (log.isDebugEnabled())
        log.debug(sm.getString("contextConfig.init"));
    context.setConfigured(false);
    ok = true;

    contextConfig(contextDigester);

    createWebXmlDigester(context.getXmlNamespaceAware(),
            context.getXmlValidation());
}
 
Example 4
Source File: TldConfig.java    From tomcatsrc with Apache License 2.0 6 votes vote down vote up
/**
 * Create (if necessary) and return a Digester configured to process the
 * tld.
 */
private static synchronized Digester createTldDigester(boolean validation,
        boolean blockExternal) {

    Digester digester;
    int cacheIndex = 0;
    if (validation) {
        cacheIndex += 1;
    }
    if (blockExternal) {
        cacheIndex += 2;
    }
    digester = tldDigesters[cacheIndex];
    if (digester == null) {
        digester = DigesterFactory.newDigester(validation,
                true, new TldRuleSet(), blockExternal);
        digester.getParser();
        tldDigesters[cacheIndex] = digester;
    }
    return digester;
}
 
Example 5
Source File: ContextConfig.java    From Tomcat8-Source-Read with MIT License 5 votes vote down vote up
/**
 * Process a "init" event for this Context.
 */
protected synchronized void init() {
    // Called from StandardContext.init()

    Digester contextDigester = createContextDigester();
    contextDigester.getParser();

    if (log.isDebugEnabled()) {
        log.debug(sm.getString("contextConfig.init"));
    }
    context.setConfigured(false);
    ok = true;

    contextConfig(contextDigester);
}