Package org.apache.commons.digester

Examples of org.apache.commons.digester.Digester.push()


      // Configure the processing rules that we need
      digester.addCallMethod("web-app/servlet-mapping", "add", 2);
      digester.addCallParam("web-app/servlet-mapping/servlet-name", 0);
      digester.addCallParam("web-app/servlet-mapping/url-pattern", 1);

      digester.push(this);
      try {
        digester.parse(input);
      } catch (Exception e) {
        throw new ServletException("Could not parse /WEB-INF/web.xml", e);
      }
View Full Code Here


  }

  private RootConfigImpl parse(URL url) throws ConfigException {
    Digester digester = createDigester();   
    RootConfigImpl root = createRoot();
    digester.push(root);
    log.debug("Parsing: " + url);
    try {
      InputSource input = new InputSource(url.openStream());
      input.setSystemId(url.toString());
      digester.parse(input);
View Full Code Here

        confirmSetup();

        // pull in the appropriate parts of the
        // web.xml file -- first the init-parameters
        Digester digester = new Digester();
        digester.push(this.config);
        digester.setValidating(false);
        digester.addCallMethod("web-app/servlet/init-param", //$NON-NLS-1$
                "setInitParameter", 2); //$NON-NLS-1$
        digester.addCallParam("web-app/servlet/init-param/param-name", 0); //$NON-NLS-1$
        digester.addCallParam("web-app/servlet/init-param/param-value", 1); //$NON-NLS-1$
View Full Code Here

        }

        // now the context parameters..
        digester = new Digester();
        digester.setValidating(false);
        digester.push(this.context);
        digester.addCallMethod("web-app/context-param", "setInitParameter", 2); //$NON-NLS-1$ //$NON-NLS-2$
        digester.addCallParam("web-app/context-param/param-name", 0); //$NON-NLS-1$
        digester.addCallParam("web-app/context-param/param-value", 1); //$NON-NLS-1$
        try {
            InputStream input = this.context.getResourceAsStream(pathname);
View Full Code Here

        super();

        Digester digester = initDigester();
        for (int i = 0; i < streams.length; i++) {
            digester.push(this);
            digester.parse(streams[i]);
        }

        this.process();
    }
View Full Code Here

        super();

        Digester digester = initDigester();
        for (int i = 0; i < uris.length; i++) {
            digester.push(this);
            digester.parse(uris[i]);
        }

        this.process();
    }   
View Full Code Here

        super();

        Digester digester = initDigester();
        for (int i = 0; i < urls.length; i++) {
            digester.push(this);
            InputStream stream = null;
            try {
                stream = urls[i].openStream();
                org.xml.sax.InputSource source =
                     new org.xml.sax.InputSource(urls[i].toExternalForm());
View Full Code Here

  }

  private Digester configure(TobagoConfig config) {
    Digester digester = new Digester();
    digester.setUseContextClassLoader(true);
    digester.push(config);
    digester.setValidating(true);

    // theme-config
    digester.addCallMethod("tobago-config/theme-config/default-theme", "setDefaultThemeName", 0);
    digester.addCallMethod("tobago-config/theme-config/supported-theme", "addSupportedThemeName", 0);
View Full Code Here

        ArrayList<ExtractChangeLogEntry> changeLog = new ArrayList<ExtractChangeLogEntry>();

        Digester digester = new Digester();
        digester.setClassLoader(ExtractChangeLogSet.class.getClassLoader());
        digester.push(changeLog);
        digester.addObjectCreate("*/extractChanges/entry", ExtractChangeLogEntry.class);

        digester.addBeanPropertySetter("*/extractChanges/entry/zipFile");

        digester.addObjectCreate("*/extractChanges/entry/file",
 
View Full Code Here

      ConvertUtils.register(caseConverter, Case.class);
      ConvertUtils.register(trailingSlashConverter, TrailingSlash.class);
      ConvertUtils.register(phaseIdConverter, PhaseId.class);
      ConvertUtils.register(redirectConverter, Redirect.class);

      digester.push(builder);
      digester.parse(resource);
   }

   /**
    * Configure the digester. Assume that the builder object will be pushed
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.