diff --git a/bundles/org.openhab.ui.basic/src/main/java/org/openhab/ui/basic/internal/servlet/ManifestServlet.java b/bundles/org.openhab.ui.basic/src/main/java/org/openhab/ui/basic/internal/servlet/ManifestServlet.java index 676589f1f3..c347d3efe5 100644 --- a/bundles/org.openhab.ui.basic/src/main/java/org/openhab/ui/basic/internal/servlet/ManifestServlet.java +++ b/bundles/org.openhab.ui.basic/src/main/java/org/openhab/ui/basic/internal/servlet/ManifestServlet.java @@ -13,7 +13,6 @@ package org.openhab.ui.basic.internal.servlet; import java.io.IOException; -import java.io.PrintWriter; import javax.servlet.Servlet; import javax.servlet.ServletException; @@ -66,11 +65,8 @@ public ManifestServlet(final @Reference PageRenderer renderer) { private void generateManifest(ServletResponse res, @Nullable String sitemapName) throws IOException, RenderException { - PrintWriter resWriter; - resWriter = res.getWriter(); - resWriter.append(renderer.renderManifest(sitemapName)); - res.setContentType(MANIFEST_CONTENT_TYPE); + res.getWriter().append(renderer.renderManifest(sitemapName)); } @Override diff --git a/bundles/org.openhab.ui.basic/src/main/java/org/openhab/ui/basic/internal/servlet/WebAppServlet.java b/bundles/org.openhab.ui.basic/src/main/java/org/openhab/ui/basic/internal/servlet/WebAppServlet.java index ae859dcfd3..b7dcf88800 100644 --- a/bundles/org.openhab.ui.basic/src/main/java/org/openhab/ui/basic/internal/servlet/WebAppServlet.java +++ b/bundles/org.openhab.ui.basic/src/main/java/org/openhab/ui/basic/internal/servlet/WebAppServlet.java @@ -13,7 +13,6 @@ package org.openhab.ui.basic.internal.servlet; import java.io.IOException; -import java.io.PrintWriter; import java.util.Map; import java.util.Set; import java.util.concurrent.CopyOnWriteArraySet; @@ -118,19 +117,13 @@ protected void deactivate() { } private void showSitemapList(ServletResponse res) throws IOException, RenderException { - PrintWriter resWriter; - resWriter = res.getWriter(); - resWriter.append(renderer.renderSitemapList(sitemapProviders)); - res.setContentType(CONTENT_TYPE); + res.getWriter().append(renderer.renderSitemapList(sitemapProviders)); } private void showSettings(ServletResponse res) throws IOException, RenderException { - PrintWriter resWriter; - resWriter = res.getWriter(); - resWriter.append(renderer.renderSettings()); - res.setContentType(CONTENT_TYPE); + res.getWriter().append(renderer.renderSettings()); } @Override