added missing dependencies and response code

Signed-off-by: Kai Kreuzer <kai@openhab.org>
This commit is contained in:
Kai Kreuzer 2018-11-01 11:28:11 +01:00 committed by Martin van Wingerden
parent c07a5ddd9c
commit bfd03fd889
2 changed files with 3 additions and 0 deletions

View File

@ -11,7 +11,9 @@ Import-Package:
javax.servlet.http,
org.apache.commons.io,
org.eclipse.jdt.annotation;resolution:=optional,
org.eclipse.jetty.server,
org.eclipse.jetty.servlet,
org.eclipse.jetty.util.resource,
org.openhab.ui.dashboard,
org.osgi.framework,
org.osgi.service.cm,

View File

@ -72,6 +72,7 @@ public class RootServlet extends DefaultServlet {
if (req.getRequestURI().equals("/")) {
resp.sendRedirect("/start/index");
} else if (!req.getRequestURI().startsWith("/static/")) {
resp.sendError(HttpServletResponse.SC_NOT_FOUND);
resp.setContentType("text/html;charset=UTF-8");
resp.getWriter().append(page404);
resp.getWriter().close();