< prev index next >


Print this page


@@ -56,11 +56,11 @@
    HttpServer server = HttpServer.create(new InetSocketAddress(8000));
    server.createContext("/applications/myapp", new MyHandler());
    server.setExecutor(null); // creates a default executor
-   </blockquote></pre>
+   </pre></blockquote>
    <p>The example above creates a simple HttpServer which uses the calling
    application thread to invoke the handle() method for incoming http
    requests directed to port 8000, and to the path /applications/myapp/.
    The {@link com.sun.net.httpserver.HttpExchange} class encapsulates everything an application needs to

@@ -90,11 +90,11 @@
    TrustManagerFactory tmf = TrustManagerFactory.getInstance("SunX509");
    SSLContext ssl = SSLContext.getInstance("TLS");
    ssl.init(kmf.getKeyManagers(), tmf.getTrustManagers(), null);
-   </blockquote></pre>
+   </pre></blockquote>
    In the example above, a keystore file called "testkeys", created with the keytool utility
    is used as a certificate store for client and server certificates.
    The following code shows how the SSLContext is then used in a HttpsConfigurator
    and how the SSLContext and HttpsConfigurator are linked to the HttpsServer.

@@ -117,11 +117,11 @@
         // statement above could throw IAE if any params invalid.
         // eg. if app has a UI and parameters supplied by a user.
-   </blockquote></pre>
-   <p>
+   </pre></blockquote>
    @since 1.6
 package com.sun.net.httpserver;
< prev index next >