diff --git a/bundles/org.openhab.binding.amazonechocontrol/src/main/java/org/openhab/binding/amazonechocontrol/internal/AccountServlet.java b/bundles/org.openhab.binding.amazonechocontrol/src/main/java/org/openhab/binding/amazonechocontrol/internal/AccountServlet.java index 0b38a5ec3f1..6dc9e05105d 100644 --- a/bundles/org.openhab.binding.amazonechocontrol/src/main/java/org/openhab/binding/amazonechocontrol/internal/AccountServlet.java +++ b/bundles/org.openhab.binding.amazonechocontrol/src/main/java/org/openhab/binding/amazonechocontrol/internal/AccountServlet.java @@ -20,6 +20,7 @@ import java.net.URLDecoder; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.HashMap; +import java.util.Hashtable; import java.util.List; import java.util.Map; import java.util.stream.Collectors; @@ -90,7 +91,10 @@ public class AccountServlet extends HttpServlet { servletUrlWithoutRoot = "amazonechocontrol/" + URLEncoder.encode(id, StandardCharsets.UTF_8); servletUrl = "/" + servletUrlWithoutRoot; - httpService.registerServlet(servletUrl, this, null, httpService.createDefaultHttpContext()); + Hashtable initParams = new Hashtable<>(); + initParams.put("servlet-name", servletUrl); + + httpService.registerServlet(servletUrl, this, initParams, httpService.createDefaultHttpContext()); } catch (NamespaceException | ServletException e) { throw new IllegalStateException(e.getMessage()); }