diff options
-rw-r--r-- | debug.xml | 50 | ||||
-rw-r--r-- | src/org/traccar/Context.java | 4 | ||||
-rw-r--r-- | src/org/traccar/database/DataManager.java | 2 | ||||
-rw-r--r-- | src/org/traccar/http/WebServer.java | 12 |
4 files changed, 34 insertions, 34 deletions
@@ -4,6 +4,31 @@ <properties> + <!-- SERVER CONFIG --> + + <entry key='web.enable'>true</entry> + <!--<entry key='web.address'></entry>--> + <entry key='web.port'>8082</entry> + <entry key='web.application'>../traccar-web/traccar-web.war</entry> + <entry key='web.new'>true</entry> + <entry key='web.path'>web</entry> + <entry key='web.mobile'>webm</entry> + + <entry key='geocoder.enable'>false</entry> + <entry key='geocoder.type'>nominatim</entry> + <entry key='geocoder.url'>http://nominatim.openstreetmap.org/reverse</entry> + + <!--<entry key='filter.enable'>true</entry> + <entry key='filter.limit'>3600</entry> + <entry key='filter.invalid'>true</entry> + <entry key='filter.zero'>true</entry> + <entry key='filter.duplicate'>true</entry> + <entry key='filter.distance'>50</entry>--> + + <entry key='logger.enable'>true</entry> + <entry key='logger.level'>all</entry> + <entry key='logger.file'>target/tracker-server.log</entry> + <!-- DATABASE CONFIG --> <!--<entry key='database.driverFile'>hsqldb.jar</entry>--> @@ -105,31 +130,6 @@ UPDATE device SET positionId = :id WHERE id = :deviceId; </entry> - <!-- SERVER CONFIG --> - - <entry key='http.enable'>true</entry> - <!--<entry key='http.address'></entry>--> - <entry key='http.port'>8082</entry> - <entry key='http.application'>../traccar-web/traccar-web.war</entry> - <entry key='http.new'>true</entry> - <entry key='http.path'>web</entry> - <entry key='http.mobile'>webm</entry> - - <entry key='geocoder.enable'>false</entry> - <entry key='geocoder.type'>nominatim</entry> - <entry key='geocoder.url'>http://nominatim.openstreetmap.org/reverse</entry> - - <!--<entry key='filter.enable'>true</entry> - <entry key='filter.limit'>3600</entry> - <entry key='filter.invalid'>true</entry> - <entry key='filter.zero'>true</entry> - <entry key='filter.duplicate'>true</entry> - <entry key='filter.distance'>50</entry>--> - - <entry key='logger.enable'>true</entry> - <entry key='logger.level'>all</entry> - <entry key='logger.file'>target/tracker-server.log</entry> - <!-- PROTOCOL CONFIG --> <entry key='detector.port'>5000</entry> diff --git a/src/org/traccar/Context.java b/src/org/traccar/Context.java index dcab28a9c..16ff33f18 100644 --- a/src/org/traccar/Context.java +++ b/src/org/traccar/Context.java @@ -91,7 +91,7 @@ public class Context { dataManager = new DataManager(properties); dataCache = new DataCache(dataManager); - if (Boolean.valueOf(properties.getProperty("http.new"))) { + if (Boolean.valueOf(properties.getProperty("web.new"))) { permissionsManager = new PermissionsManager(); } @@ -106,7 +106,7 @@ public class Context { } } - if (Boolean.valueOf(properties.getProperty("http.enable"))) { + if (Boolean.valueOf(properties.getProperty("web.enable"))) { webServer = new WebServer(); } diff --git a/src/org/traccar/database/DataManager.java b/src/org/traccar/database/DataManager.java index 8ca89d558..e9647922c 100644 --- a/src/org/traccar/database/DataManager.java +++ b/src/org/traccar/database/DataManager.java @@ -113,7 +113,7 @@ public class DataManager { dataSource = ds; } - if (Boolean.valueOf(properties.getProperty("http.new"))) { + if (Boolean.valueOf(properties.getProperty("web.new"))) { createDatabaseSchema(); } } diff --git a/src/org/traccar/http/WebServer.java b/src/org/traccar/http/WebServer.java index 477e54c3c..b56d04e87 100644 --- a/src/org/traccar/http/WebServer.java +++ b/src/org/traccar/http/WebServer.java @@ -39,15 +39,15 @@ public class WebServer { public WebServer() { Properties properties = Context.getProps(); - String address = properties.getProperty("http.address"); - Integer port = Integer.valueOf(properties.getProperty("http.port", "8082")); + String address = properties.getProperty("web.address"); + Integer port = Integer.valueOf(properties.getProperty("web.port", "8082")); if (address == null) { server = new Server(port); } else { server = new Server(new InetSocketAddress(address, port)); } - if (Boolean.valueOf(properties.getProperty("http.new"))) { + if (Boolean.valueOf(properties.getProperty("web.new"))) { ServletContextHandler servletHandler = new ServletContextHandler(ServletContextHandler.SESSIONS); servletHandler.setContextPath("/api"); @@ -58,13 +58,13 @@ public class WebServer { servletHandler.addServlet(new ServletHolder(new MainServlet()), "/*"); ResourceHandler mobileResourceHandler = new ResourceHandler(); - mobileResourceHandler.setResourceBase(properties.getProperty("http.mobile")); + mobileResourceHandler.setResourceBase(properties.getProperty("web.mobile")); mobileResourceHandler.setWelcomeFiles(new String[] {"index.html"}); ContextHandler mobileContext = new ContextHandler("/m"); mobileContext.setHandler(mobileResourceHandler); ResourceHandler resourceHandler = new ResourceHandler(); - resourceHandler.setResourceBase(properties.getProperty("http.path")); + resourceHandler.setResourceBase(properties.getProperty("web.path")); resourceHandler.setWelcomeFiles(new String[]{"index.html"}); HandlerList handlerList = new HandlerList(); @@ -83,7 +83,7 @@ public class WebServer { WebAppContext webapp = new WebAppContext(); webapp.setContextPath("/"); - webapp.setWar(properties.getProperty("http.application")); + webapp.setWar(properties.getProperty("web.application")); server.setHandler(webapp); } |