X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=utils%2FJettyExamplesDir.java;h=5518e139b1d357f52be87f33962123fa763ecd6e;hb=4bbd068738ed2e685f580ea1b65a7b11e32d3f3e;hp=58f7694be7d3ea9436bca062fd395bd4a883702f;hpb=be5be9d97cdb7248784777fa17face7d345bdd33;p=jalview.git diff --git a/utils/JettyExamplesDir.java b/utils/JettyExamplesDir.java index 58f7694..5518e13 100644 --- a/utils/JettyExamplesDir.java +++ b/utils/JettyExamplesDir.java @@ -1,3 +1,23 @@ +/******************************************************************************* + * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$) + * Copyright (C) $$Year-Rel$$ The Jalview Authors + * + * This file is part of Jalview. + * + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 + * of the License, or (at your option) any later version. + * + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Jalview. If not, see . + * The Jalview Authors are detailed in the 'AUTHORS' file. + ******************************************************************************/ // //======================================================================== //Copyright (c) 1995-2015 Mort Bay Consulting Pty. Ltd. @@ -16,7 +36,6 @@ //======================================================================== // - import org.eclipse.jetty.server.Handler; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.handler.DefaultHandler; @@ -50,16 +69,15 @@ public class JettyExamplesDir // 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[] - { "applets.html" }); + resource_handler.setWelcomeFiles(new String[] { "applets.html" }); resource_handler.setResourceBase("."); // Add the ResourceHandler to the server. // GzipHandler gzip = new GzipHandler(); // server.setHandler(gzip); HandlerList handlers = new HandlerList(); - handlers.setHandlers(new Handler[] - { resource_handler, new DefaultHandler() }); + handlers.setHandlers(new Handler[] { resource_handler, + new DefaultHandler() }); server.setHandler(handlers); // Start things up! By using the server.join() the server thread will join @@ -69,5 +87,5 @@ public class JettyExamplesDir // for more details. server.start(); server.join(); + } } -} \ No newline at end of file