Package org.eclipse.jetty.server

Examples of org.eclipse.jetty.server.Server.addConnector()


  @Override
  public void run() {
    final Server server = new Server();
    configuration.configure();
    server.addConnector(buildConnector());
    server.setHandler(buildHandlers());
    server.setSendServerVersion(false);
    server.setGracefulShutdown(GRACEFUL_SHUTDOWN_PERIOD);
    server.setStopAtShutdown(gracefulShutdown);
   
View Full Code Here


  // Set some timeout options to make debugging easier.
  connector.setMaxIdleTime(timeout);
  connector.setSoLingerTime(-1);
  connector.setPort(8080);
  server.addConnector(connector);

  WebAppContext bb = new WebAppContext();
  bb.setServer(server);
  bb.setContextPath("/");
  bb.setWar("src/main/webapp");
View Full Code Here

    {
        Server server = new Server();

        ServerConnector connector = new ServerConnector( server );
        connector.setPort( 8080 );
        server.addConnector( connector );

        WebAppContext web = new WebAppContext( server, "struts2.example", "/example" );
        web.setWar( "libraries/struts2/example/src/main/webapp/" );

        try
View Full Code Here

       
        final SocketConnector connector = new SocketConnector();
        connector.setMaxIdleTime(timeout);
        connector.setSoLingerTime(-1);
        connector.setPort(8080);
        server.addConnector(connector);
       
        final WebAppContext bb = new WebAppContext();
        bb.setServer(server);
        bb.setContextPath("/");
        bb.setWar("src/main/webapp");
View Full Code Here

        http_config.setSendServerVersion(true);

        // HTTP connector
        ServerConnector http = new ServerConnector(server,new HttpConnectionFactory(http_config));       
        http.setPort(8080);
        server.addConnector(http);
        // SSL Context Factory for HTTPS and SPDY
        String jetty_distro = System.getProperty("jetty.distro","../../jetty-distribution/target/distribution");
        SslContextFactory sslContextFactory = new SslContextFactory();
        sslContextFactory.setKeyStorePath(jetty_distro + "/etc/keystore");
View Full Code Here

       
        // HTTP2 Connector
        ServerConnector http2Connector =
            new ServerConnector(server,ssl,alpn,h2,new HttpConnectionFactory(https_config));
        http2Connector.setPort(8443);
        server.addConnector(http2Connector);
       
        ALPN.debug=true;
       
        server.start();
        server.dumpStdErr();
View Full Code Here

    private Server createServer(ServletHolder servletHolder, String nodeName)
    {
        Server server = new Server();
        ServerConnector connector = new ServerConnector(server);
        server.addConnector(connector);

        ServletContextHandler context = new ServletContextHandler(server, CONTEXT_PATH, ServletContextHandler.SESSIONS);
        context.addServlet(servletHolder, SERVLET_PATH + "/*");

        if (nodeName != null)
View Full Code Here

        Map<Short, PushStrategy> pushStrategies = new HashMap<>();
        pushStrategies.put(SPDY.V3, new ReferrerPushStrategy());
        HTTPSPDYServerConnector connector = new HTTPSPDYServerConnector(server, sslContextFactory, pushStrategies);
        connector.setPort(8443);
        server.addConnector(connector);

        // Drupal seems to only work on the root context,
        // at least out of the box without additional plugins

        String root = "/home/simon/programs/drupal-7.23";
View Full Code Here

        Map<Short, PushStrategy> pushStrategies = new HashMap<>();
        pushStrategies.put(SPDY.V3, new ReferrerPushStrategy());
        HTTPSPDYServerConnector tlsConnector = new HTTPSPDYServerConnector(server, sslContextFactory, pushStrategies);
        tlsConnector.setPort(tlsPort);
        server.addConnector(tlsConnector);
        HTTPSPDYServerConnector connector = new HTTPSPDYServerConnector(server, null, pushStrategies);
        connector.setPort(port);
        server.addConnector(connector);

        String root = "/home/simon/programs/wordpress-3.7.1";
View Full Code Here

        HTTPSPDYServerConnector tlsConnector = new HTTPSPDYServerConnector(server, sslContextFactory, pushStrategies);
        tlsConnector.setPort(tlsPort);
        server.addConnector(tlsConnector);
        HTTPSPDYServerConnector connector = new HTTPSPDYServerConnector(server, null, pushStrategies);
        connector.setPort(port);
        server.addConnector(connector);

        String root = "/home/simon/programs/wordpress-3.7.1";

        ServletContextHandler context = new ServletContextHandler(server, "/wp");
        context.setResourceBase(root);
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.