Package org.mortbay.xml

Examples of org.mortbay.xml.XmlConfiguration


                connector.setThreadPool(new QueuedThreadPool(20));
                connector.setMaxIdleTime(1000 * 60 * 60); // this will make debugging easier

                Server server = new Server(port);
                if (new File("jetty.xml").exists()) {
                    XmlConfiguration configuration = new XmlConfiguration(new FileInputStream("jetty.xml"));
                    configuration.configure(server);
                    log.info("jetty config detected ...");
                }
                server.setConnectors(new Connector[]{connector});
                WebAppContext webApp = new WebAppContext(path, "/");

View Full Code Here


    addStaticHandler(server, "images");
    addStaticHandler(server, "javascripts");
    addStaticHandler(server, "stylesheets");

    WebAppContext webappcontext = new WebAppContext();
    XmlConfiguration configuration = new XmlConfiguration( JettyEmbedder.class.getResourceAsStream( "/jetty-env.xml" ) );
    configuration.configure( webappcontext );
    server.addHandler( webappcontext );
    server.start();

    Runtime.getRuntime().addShutdownHook( new Thread() {
      public void run() {
View Full Code Here

            wah.setTempDirectory(new File("target/work"));

            String jettyConfigFile = System.getProperty("jetty.config.file");
            if (jettyConfigFile != null) {
                log.info("Loading Jetty config from file: " + jettyConfigFile);
                (new XmlConfiguration(new FileInputStream(jettyConfigFile))).configure(jettyServer);
            }

           jettyServer.start();

            // use this to test normal stop behaviour, that is, to check stuff that
View Full Code Here

          1024 * 1024 * 2);

      final String jettyConfigFile = System.getProperty("jetty.config.file");
      if (jettyConfigFile != null) {
        log.info("Loading Jetty config from file: " + jettyConfigFile);
        (new XmlConfiguration(
            new FileInputStream(
                jettyConfigFile))).configure(jettyServer);
      }

      jettyServer.start();
View Full Code Here

        if (getJettyConfig() == null) {
            return;
        }

        logger.info("Configuring Jetty from xml configuration file = " + getJettyConfig());
        XmlConfiguration xmlConfiguration = new XmlConfiguration(getJettyConfig().toURI().toURL());
        xmlConfiguration.configure(getServer().getProxiedObject());
    }
View Full Code Here


            String jettyConfigFile = System.getProperty("jetty.config.file");
            if (jettyConfigFile != null) {
                log.info("Loading Jetty config from file: " + jettyConfigFile);
                (new XmlConfiguration(new FileInputStream(jettyConfigFile))).configure(jettyServer);
            }

           jettyServer.start();

           /*
 
View Full Code Here

          //reset CCL
          current.setContextClassLoader(null);
          if (log.isDebugEnabled())
            log.debug("Reading Jetty config " + config.toString(), null, null);

          xmlConfig = new XmlConfiguration(config);
          Object root = xmlConfig.configure();
          if (!(root instanceof Server)) {
            throw new IllegalArgumentException(
              "expected a Server object as a root for server configuration");
          }
View Full Code Here

TOP

Related Classes of org.mortbay.xml.XmlConfiguration

Copyright © 2018 www.massapicom. 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.