Add temporary test jetty server (to be removed later).

This commit is contained in:
Rémi Cocula
2016-11-29 23:03:07 +01:00
parent 3354f6623a
commit f6541632bb
2 changed files with 48 additions and 0 deletions
@@ -0,0 +1,20 @@
package org.libresonic.player;
import org.mortbay.jetty.Server;
import org.mortbay.jetty.webapp.WebAppContext;
public class TestServer {
public static void main(String[] args) throws Exception {
Server server = new Server(8080);
WebAppContext webapp = new WebAppContext();
webapp.setContextPath("/libresonic");
String baseDir = TestServer.class.getResource("/" + TestServer.class.getName().replaceAll("\\.", "/") + ".class").getFile();
baseDir = baseDir.substring(0,baseDir.indexOf("/target"));
webapp.setWar(baseDir + "/src/main/webapp");
server.setHandler(webapp);
server.setAttribute("reload", "automatic");
server.start();
server.join();
}
}