From cfa85894465dbf2d286e083d962babdf14641582 Mon Sep 17 00:00:00 2001 From: ulrich Date: Sun, 04 Apr 2021 14:30:21 +0000 Subject: [PATCH] UI begonnen --- src/de/uhilger/mediaz/Server.java | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/src/de/uhilger/mediaz/Server.java b/src/de/uhilger/mediaz/Server.java index c31c9fb..4bc3286 100644 --- a/src/de/uhilger/mediaz/Server.java +++ b/src/de/uhilger/mediaz/Server.java @@ -22,6 +22,7 @@ import de.uhilger.mediaz.api.FileHandler; import de.uhilger.mediaz.api.StopServerHandler; import de.uhilger.mediaz.api.StoreTestHandler; +import java.io.File; import java.io.IOException; import java.util.logging.Logger; import java.net.InetSocketAddress; @@ -41,6 +42,7 @@ public static final String RB_SERVER_START_MSG = "msgServerStart"; public static final String RB_WEBROOT = "webroot"; + public static final String RB_UI_ROOT = "uiroot"; public static final String RB_STOP_SERVER = "stopServer"; public static final String RB_ABLAGE_TEST = "testAblage"; public static final String RB_STORE_TEST = "testStore"; @@ -90,9 +92,14 @@ */ public void start() throws IOException { logger.log(Level.INFO, App.getRs(RB_SERVER_START_MSG), Integer.toString(port)); + + String ui = App.getInitParameter(App.getRs(App.RB_AP_UI)); + + File uiDir = new File(ui); HttpServer server = HttpServer.create(new InetSocketAddress(port), 0); server.createContext(ctx + App.getRs(RB_WEBROOT), new FileHandler(App.getInitParameter(App.getRs(App.RB_AP_WWW_DATA)))); + server.createContext(ctx + App.getRs(RB_UI_ROOT), new FileHandler(uiDir.getAbsolutePath())); server.createContext(ctx + App.getRs(RB_STOP_SERVER), new StopServerHandler()); server.createContext(ctx + App.getRs(RB_ABLAGE_TEST), new AblageTestHandler()); server.createContext(ctx + App.getRs(RB_STORE_TEST), new StoreTestHandler()); -- Gitblit v1.9.3