aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-06-05 17:02:22 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2015-06-05 17:02:22 +1200
commit35ae7fbd26180fa56072095ef47d6c54a4e22393 (patch)
tree2ee76cc064804d0d09fe65931d9873dd907fdf24 /src
parent96a8551d16506809887cb28d0c61c1ab5cb0ce3c (diff)
downloadtrackermap-server-35ae7fbd26180fa56072095ef47d6c54a4e22393.tar.gz
trackermap-server-35ae7fbd26180fa56072095ef47d6c54a4e22393.tar.bz2
trackermap-server-35ae7fbd26180fa56072095ef47d6c54a4e22393.zip
Re-factor config params
Diffstat (limited to 'src')
-rw-r--r--src/org/traccar/Context.java4
-rw-r--r--src/org/traccar/database/DataManager.java2
-rw-r--r--src/org/traccar/http/WebServer.java12
3 files changed, 9 insertions, 9 deletions
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);
}