Added SSl support in the HTTPServer

This commit is contained in:
Ziver Koc 2008-12-03 15:11:04 +00:00
parent f6ba9817b2
commit 354c459aa5
2 changed files with 64 additions and 4 deletions

View file

@ -3,6 +3,7 @@ package zutil.test;
import java.io.IOException;
import java.util.HashMap;
import zutil.FileFinder;
import zutil.network.http.HttpPage;
import zutil.network.http.HttpPrintStream;
import zutil.network.http.HttpServer;
@ -10,7 +11,8 @@ import zutil.network.http.HttpServer;
public class HTTPGuessTheNumber implements HttpPage{
public static void main(String[] args) throws IOException{
HttpServer server = new HttpServer("localhost", 80);
HttpServer server = new HttpServer("localhost", 443, FileFinder.find("keySSL"), "rootroot");//SSL
//HttpServer server = new HttpServer("localhost", 80);
server.setDefaultPage(new HTTPGuessTheNumber());
server.run();
}