Package org.eclipse.jetty.xml

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


        if (contextXml != null)
        {
            File file = FileUtils.getFile(contextXml);
            XmlConfiguration xmlConfiguration = new XmlConfiguration(Resource.toURL(file));
            getLog().info("Applying context xml file "+contextXml);
            xmlConfiguration.configure(webApp);  
        }
       
        //If no contextPath was specified, go with default of project artifactid
        String cp = webApp.getContextPath();
        if (cp == null || "".equals(cp))
View Full Code Here


        //already configured by the time the context xml file is applied.
        if (contextXml != null)
        {
            XmlConfiguration xmlConfiguration = new XmlConfiguration(Resource.toURL(contextXml));
            xmlConfiguration.getIdMap().put("Server",server);
            xmlConfiguration.configure(webApp);
        }

        this.server.addWebApplication(webApp);

        System.err.println("STOP PORT="+stopPort+", STOP KEY="+stopKey);
View Full Code Here

       
        for ( File xmlFile : jettyXmls )
        {
            LOG.info( "Configuring Jetty from xml configuration file = " + xmlFile.getCanonicalPath() );       
            XmlConfiguration xmlConfiguration = new XmlConfiguration(Resource.toURL(xmlFile));
            xmlConfiguration.configure(this.server);
        }
    }


View Full Code Here

public class JettyEmbedIntegration {

    public static void main(String args[]) throws Exception {
        Resource jetty_xml = Resource.newSystemResource("jetty/jetty.xml");
        XmlConfiguration configuration = new XmlConfiguration(jetty_xml.getInputStream());
        Server server = (Server) configuration.configure();
        int port = 8081;
        Connector[] connectors = server.getConnectors();
        for (Connector connector : connectors) {
            connector.setPort(port);
        }
View Full Code Here

    private ConfigClientService configClientService;

    public void afterPropertiesSet() throws Exception {
        Resource configXml = Resource.newSystemResource(config);
        XmlConfiguration configuration = new XmlConfiguration(configXml.getInputStream());
        server = (Server) configuration.configure();
        Integer port = getPort();
        if (port != null && port > 0) {
            Connector[] connectors = server.getConnectors();
            for (Connector connector : connectors) {
                connector.setPort(port);
View Full Code Here

    {
        try {
            serverLog.info("Jetty server config file = "+jettyConfig) ;
            Server server = new Server() ;
            XmlConfiguration configuration = new XmlConfiguration(new FileInputStream(jettyConfig)) ;
            configuration.configure(server) ;
            return server ;
        } catch (Exception ex)
        {
            serverLog.error("SPARQLServer: Failed to configure server: " + ex.getMessage(), ex) ;
            throw new FusekiException("Failed to configure a server using configuration file '"+jettyConfig+"'") ;
View Full Code Here

                            xmlConfiguration.getIdMap().put("ESClient", client);
                        }
                        // Inject elasticsearch properties
                        xmlConfiguration.getProperties().putAll(esProperties);

                        objs[i] = xmlConfiguration.configure();
                        lastXmlConfiguration = xmlConfiguration;
                    }
                    // Find jetty Server with id  jettyConfigServerId
                    Object serverObject = lastXmlConfiguration.getIdMap().get(jettyConfigServerId);
                    if (serverObject != null) {
View Full Code Here

      Server server = new Server();

      // TODO: Replace paths relative to /bin/
      XmlConfiguration configuration = new XmlConfiguration(new File(
          "../jetty/shuttl.xml").toURI().toURL());
      configuration.configure(server);

      // TODO: Replace paths relative to /bin/
      server.setHandler(new WebAppContext("../webapps/shuttl", "/shuttl"));
      ShuttlServer servermbean = new ShuttlServer();
      Connector connectors[] = server.getConnectors();
View Full Code Here

    }

    public void start() throws Exception {
        Resource configXml = Resource.newSystemResource(config);
        XmlConfiguration configuration = new XmlConfiguration(configXml.getInputStream());
        server = (Server) configuration.configure();

        //        Integer port = getPort();
        //        if (port != null && port > 0) {
        //            Connector[] connectors = server.getConnectors();
        //            for (Connector connector : connectors) {
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.