From ac454e7696cc2cedd953874d3cde3f78b3249328 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sun, 21 Jun 2015 13:02:42 +1200 Subject: Update web path config --- setup/linux/traccar.xml | 3 +-- setup/macosx/traccar.xml | 3 +-- setup/windows/traccar.xml | 3 +-- src/org/traccar/http/WebServer.java | 7 +++---- 4 files changed, 6 insertions(+), 10 deletions(-) diff --git a/setup/linux/traccar.xml b/setup/linux/traccar.xml index 99b66336a..593042985 100644 --- a/setup/linux/traccar.xml +++ b/setup/linux/traccar.xml @@ -9,8 +9,7 @@ true 8082 true - web - webm + /opt/traccar/web true google diff --git a/setup/macosx/traccar.xml b/setup/macosx/traccar.xml index 99b66336a..593042985 100644 --- a/setup/macosx/traccar.xml +++ b/setup/macosx/traccar.xml @@ -9,8 +9,7 @@ true 8082 true - web - webm + /opt/traccar/web true google diff --git a/setup/windows/traccar.xml b/setup/windows/traccar.xml index 667dfbfb7..354ebffc1 100644 --- a/setup/windows/traccar.xml +++ b/setup/windows/traccar.xml @@ -9,8 +9,7 @@ true 8082 true - web - webm + [WEB] true google diff --git a/src/org/traccar/http/WebServer.java b/src/org/traccar/http/WebServer.java index 9315ad059..622f2b6d4 100644 --- a/src/org/traccar/http/WebServer.java +++ b/src/org/traccar/http/WebServer.java @@ -20,7 +20,6 @@ import java.util.Properties; import javax.naming.InitialContext; import org.eclipse.jetty.server.Handler; import org.eclipse.jetty.server.Server; -import org.eclipse.jetty.server.handler.ContextHandler; import org.eclipse.jetty.server.handler.HandlerList; import org.eclipse.jetty.server.handler.ResourceHandler; import org.eclipse.jetty.servlet.ServletContextHandler; @@ -58,18 +57,18 @@ public class WebServer { servletHandler.addServlet(new ServletHolder(new PositionServlet()), "/position/*"); servletHandler.addServlet(new ServletHolder(new MainServlet()), "/*"); - ResourceHandler mobileResourceHandler = new ResourceHandler(); + /*ResourceHandler mobileResourceHandler = new ResourceHandler(); mobileResourceHandler.setResourceBase(properties.getProperty("web.mobile")); mobileResourceHandler.setWelcomeFiles(new String[] {"index.html"}); ContextHandler mobileContext = new ContextHandler("/m"); - mobileContext.setHandler(mobileResourceHandler); + mobileContext.setHandler(mobileResourceHandler);*/ ResourceHandler resourceHandler = new ResourceHandler(); resourceHandler.setResourceBase(properties.getProperty("web.path")); resourceHandler.setWelcomeFiles(new String[]{"index.html"}); HandlerList handlerList = new HandlerList(); - handlerList.setHandlers(new Handler[] {servletHandler, mobileContext, resourceHandler}); + handlerList.setHandlers(new Handler[] {servletHandler, resourceHandler}); server.setHandler(handlerList); -- cgit v1.2.3