diff options
author | Abyss777 <abyss@fox5.ru> | 2018-02-02 13:53:49 +0500 |
---|---|---|
committer | Abyss777 <abyss@fox5.ru> | 2018-02-02 13:53:49 +0500 |
commit | af49fada37f21df9ed5ceb67504c45b714ec24d4 (patch) | |
tree | c3867b51f0e17104fca09c5b4ebd2c308ed6597e /src/org/traccar/web/WebServer.java | |
parent | 8f4d1c67d3996657c57ed868f34da4066095480c (diff) | |
download | trackermap-server-af49fada37f21df9ed5ceb67504c45b714ec24d4.tar.gz trackermap-server-af49fada37f21df9ed5ceb67504c45b714ec24d4.tar.bz2 trackermap-server-af49fada37f21df9ed5ceb67504c45b714ec24d4.zip |
- Use "media.path" as switch
- Handle if MediaManager undefined
Diffstat (limited to 'src/org/traccar/web/WebServer.java')
-rw-r--r-- | src/org/traccar/web/WebServer.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/org/traccar/web/WebServer.java b/src/org/traccar/web/WebServer.java index 5c3fc8aaa..06894552d 100644 --- a/src/org/traccar/web/WebServer.java +++ b/src/org/traccar/web/WebServer.java @@ -167,10 +167,10 @@ public class WebServer { servletHandler.addServlet(new ServletHolder(new AsyncSocketServlet()), "/socket"); - if (config.getBoolean("media.web.enable")) { + if (config.hasKey("media.path")) { ServletHolder servletHolder = new ServletHolder("media", DefaultServlet.class); servletHolder.setInitParameter("resourceBase", config.getString("media.path")); - servletHolder.setInitParameter("dirAllowed", config.getString("media.web.directoryAllow", "false")); + servletHolder.setInitParameter("dirAllowed", config.getString("media.directoryAllow", "false")); servletHolder.setInitParameter("pathInfoOnly", "true"); servletHandler.addServlet(servletHolder, "/media/*"); servletHandler.addFilter(MediaFilter.class, "/media/*", EnumSet.allOf(DispatcherType.class)); |