Issue #845 data rate limits

reverted embedded example
This commit is contained in:
Greg Wilkins 2016-08-16 18:16:13 +10:00
parent 83f503b86f
commit 6e2db6993b
1 changed files with 2 additions and 3 deletions

View File

@ -45,18 +45,17 @@ public class FileServer
// In this example it is the current directory but it can be configured to anything that the jvm has access to.
resource_handler.setDirectoriesListed(true);
resource_handler.setWelcomeFiles(new String[]{ "index.html" });
resource_handler.setResourceBase("/tmp/docroot");
resource_handler.setResourceBase(".");
// Add the ResourceHandler to the server.
HandlerList handlers = new HandlerList();
handlers.setHandlers(new Handler[] { resource_handler, new DefaultHandler() });
server.setHandler(handlers);
/*
// Add GzipHandler
GzipHandler gzip = new GzipHandler();
server.setHandler(gzip);
gzip.setHandler(handlers);
*/
// Start things up! By using the server.join() the server thread will join with the current thread.
// See "http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Thread.html#join()" for more details.