Package org.eclipse.jetty.xml

Examples of org.eclipse.jetty.xml.XmlConfiguration.configure()


            {
              urlPath = urlPath.substring(0, lastSlash);
              config.getProperties().put(PROPERTY_THIS_JETTY_XML_FOLDER_URL, urlPath);
            }

            Object o = config.configure();
            if (server == null)
              server = (Server)o;

            id_map = config.getIdMap();
          }
View Full Code Here


                HashMap properties = new HashMap();
                properties.put("Server", getDeploymentManager().getServer());
                properties.put(OSGiWebappConstants.JETTY_BUNDLE_ROOT, rootResource.toString());
                properties.put(OSGiServerConstants.JETTY_HOME, getDeploymentManager().getServer().getAttribute(OSGiServerConstants.JETTY_HOME));
                xmlConfiguration.getProperties().putAll(properties);
                xmlConfiguration.configure(_webApp);
            }
            finally
            {
                Thread.currentThread().setContextClassLoader(cl);
            }
View Full Code Here

                       
                        // insert the bundle's location as a property.
                        xmlConfiguration.getProperties().putAll(properties);

                        if (_contextHandler == null)
                            _contextHandler = (ContextHandler) xmlConfiguration.configure();
                        else
                            xmlConfiguration.configure(_contextHandler);
                    }
                    finally
                    {
View Full Code Here

                        xmlConfiguration.getProperties().putAll(properties);

                        if (_contextHandler == null)
                            _contextHandler = (ContextHandler) xmlConfiguration.configure();
                        else
                            xmlConfiguration.configure(_contextHandler);
                    }
                    finally
                    {
                        Thread.currentThread().setContextClassLoader(cl);
                    }
View Full Code Here

        TestConfiguration tc = new TestConfiguration();
        tc.setTestString0("preconfig");
        tc.setTestInt0(42);
        configuration.getProperties().putAll(properties);

        tc=(TestConfiguration)configuration.configure(tc);

        assertEquals("preconfig", tc.getTestString0());
        assertEquals(42, tc.getTestInt0());
        assertEquals("SetValue", tc.getTestString1());
        assertEquals(1, tc.getTestInt1());
View Full Code Here

        TestConfiguration nested = new TestConfiguration();
        nested.setTestString0("nested");
        configuration.getIdMap().put("nested", nested);

        configuration.getProperties().putAll(properties);
        TestConfiguration tc = (TestConfiguration)configuration.configure();

        assertEquals(3,count.get());

        assertEquals(newDefaultValue, tc.getTestString0());
        assertEquals(-1, tc.getTestInt0());
View Full Code Here

    public void testJettyXml() throws Exception
    {
        URL url = SpringXmlConfigurationTest.class.getClassLoader().getResource("org/eclipse/jetty/spring/jetty.xml");
        XmlConfiguration configuration = new XmlConfiguration(url);

        Server server = (Server)configuration.configure();

        server.dumpStdErr();
    }

    @Test
View Full Code Here

    public static void main( String[] args ) throws Exception
    {
        Resource fileserverXml = Resource.newSystemResource("fileserver.xml");
        XmlConfiguration configuration = new XmlConfiguration(
                fileserverXml.getInputStream());
        Server server = (Server) configuration.configure();
        server.start();
        server.join();
    }
}
View Full Code Here

          configuration.getIdMap().putAll(last.getIdMap());
        }
        if (!props.isEmpty()) {
          configuration.getProperties().putAll(props);
        }
        Object component = configuration.configure();
        if (component instanceof LifeCycle) {
          components.add((LifeCycle) component);
        }
        last = configuration;
      }
View Full Code Here

    {
      server = new Server();

      XmlConfiguration config = new XmlConfiguration(configURL);

      config.configure(server);

      WebApplicationDescriptor descriptor = getDescriptor();
      WebAppContext wac = new WebAppContext();

      wac.setWar(descriptor.getWebapp().getAbsolutePath());
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.