diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-06-05 17:02:22 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-06-05 17:02:22 +1200 |
commit | 35ae7fbd26180fa56072095ef47d6c54a4e22393 (patch) | |
tree | 2ee76cc064804d0d09fe65931d9873dd907fdf24 /src/org/traccar/http | |
parent | 96a8551d16506809887cb28d0c61c1ab5cb0ce3c (diff) | |
download | trackermap-server-35ae7fbd26180fa56072095ef47d6c54a4e22393.tar.gz trackermap-server-35ae7fbd26180fa56072095ef47d6c54a4e22393.tar.bz2 trackermap-server-35ae7fbd26180fa56072095ef47d6c54a4e22393.zip |
Re-factor config params
Diffstat (limited to 'src/org/traccar/http')
-rw-r--r-- | src/org/traccar/http/WebServer.java | 12 |
1 files changed, 6 insertions, 6 deletions
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); } |