< prev index next >

test/jdk/java/net/httpclient/LightWeightHttpServer.java

Print this page
*** 31,11 ***
  import com.sun.net.httpserver.Headers;
  import com.sun.net.httpserver.HttpContext;
  import com.sun.net.httpserver.HttpExchange;
  import com.sun.net.httpserver.HttpHandler;
  import com.sun.net.httpserver.HttpServer;
- import com.sun.net.httpserver.HttpsConfigurator;
  import com.sun.net.httpserver.HttpsServer;
  import java.io.IOException;
  import java.io.InputStream;
  import java.io.OutputStream;
  import java.net.InetAddress;
--- 31,10 ---

*** 48,10 ***
--- 47,12 ---
  import java.util.concurrent.Executors;
  import java.util.logging.ConsoleHandler;
  import java.util.logging.Level;
  import java.util.logging.Logger;
  import javax.net.ssl.SSLContext;
+ 
+ import jdk.httpclient.test.lib.common.TestServerConfigurator;
  import jdk.test.lib.net.SimpleSSLContext;
  
  public class LightWeightHttpServer {
  
      static SSLContext ctx;

*** 109,11 ***
  
          executor = Executors.newCachedThreadPool();
          httpServer.setExecutor(executor);
          httpsServer.setExecutor(executor);
          ctx = new SimpleSSLContext().get();
!         httpsServer.setHttpsConfigurator(new HttpsConfigurator(ctx));
          httpServer.start();
          httpsServer.start();
  
          port = httpServer.getAddress().getPort();
          System.out.println("HTTP server port = " + port);
--- 110,11 ---
  
          executor = Executors.newCachedThreadPool();
          httpServer.setExecutor(executor);
          httpsServer.setExecutor(executor);
          ctx = new SimpleSSLContext().get();
!         httpsServer.setHttpsConfigurator(new TestServerConfigurator(addr.getAddress(), ctx));
          httpServer.start();
          httpsServer.start();
  
          port = httpServer.getAddress().getPort();
          System.out.println("HTTP server port = " + port);
< prev index next >