aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2024-04-10 15:47:16 -0700
committerAnton Tananaev <anton@traccar.org>2024-04-10 15:47:16 -0700
commit341eaa2886a89c247f70973f22e4416325f9f34b (patch)
tree469b9bdd5064f938e9e70cf4aa0e375093f282f7 /src/main/java/org/traccar
parentf752a0b5990d4687e7dfb870faf7adbedd3a06c3 (diff)
downloadtrackermap-server-341eaa2886a89c247f70973f22e4416325f9f34b.tar.gz
trackermap-server-341eaa2886a89c247f70973f22e4416325f9f34b.tar.bz2
trackermap-server-341eaa2886a89c247f70973f22e4416325f9f34b.zip
Enable override by default
Diffstat (limited to 'src/main/java/org/traccar')
-rw-r--r--src/main/java/org/traccar/web/DefaultOverrideServlet.java (renamed from src/main/java/org/traccar/web/ModernDefaultServlet.java)6
-rw-r--r--src/main/java/org/traccar/web/WebServer.java2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/org/traccar/web/ModernDefaultServlet.java b/src/main/java/org/traccar/web/DefaultOverrideServlet.java
index a7c8cdb29..14b441f86 100644
--- a/src/main/java/org/traccar/web/ModernDefaultServlet.java
+++ b/src/main/java/org/traccar/web/DefaultOverrideServlet.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2023 Anton Tananaev (anton@traccar.org)
+ * Copyright 2023 - 2024 Anton Tananaev (anton@traccar.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -24,12 +24,12 @@ import jakarta.inject.Inject;
import java.io.File;
import java.io.IOException;
-public class ModernDefaultServlet extends DefaultServlet {
+public class DefaultOverrideServlet extends DefaultServlet {
private Resource overrideResource;
@Inject
- public ModernDefaultServlet(Config config) {
+ public DefaultOverrideServlet(Config config) {
String override = config.getString(Keys.WEB_OVERRIDE);
if (override != null) {
overrideResource = Resource.newResource(new File(override));
diff --git a/src/main/java/org/traccar/web/WebServer.java b/src/main/java/org/traccar/web/WebServer.java
index 4759942b1..68fcf52de 100644
--- a/src/main/java/org/traccar/web/WebServer.java
+++ b/src/main/java/org/traccar/web/WebServer.java
@@ -139,7 +139,7 @@ public class WebServer implements LifecycleObject {
}
private void initWebApp(ServletContextHandler servletHandler) {
- ServletHolder servletHolder = new ServletHolder(new ModernDefaultServlet(config));
+ ServletHolder servletHolder = new ServletHolder(new DefaultOverrideServlet(config));
servletHolder.setInitParameter("resourceBase", new File(config.getString(Keys.WEB_PATH)).getAbsolutePath());
servletHolder.setInitParameter("dirAllowed", "false");
if (config.getBoolean(Keys.WEB_DEBUG)) {