diff --git a/apps/routerconsole/java/build.xml b/apps/routerconsole/java/build.xml index d571e4809..f77a14387 100644 --- a/apps/routerconsole/java/build.xml +++ b/apps/routerconsole/java/build.xml @@ -123,6 +123,7 @@ + diff --git a/apps/routerconsole/jsp/error.jsp b/apps/routerconsole/jsp/error.jsp new file mode 100644 index 000000000..da2dfeac8 --- /dev/null +++ b/apps/routerconsole/jsp/error.jsp @@ -0,0 +1,32 @@ +<%@page contentType="text/html"%> +<%@page pageEncoding="UTF-8"%> + +<% + // Let's make this easy... + final Integer ERROR_CODE = (Integer) request.getAttribute(org.mortbay.jetty.servlet.ServletHandler.__J_S_ERROR_STATUS_CODE); + final String ERROR_URI = (String) request.getAttribute(org.mortbay.jetty.servlet.ServletHandler.__J_S_ERROR_REQUEST_URI); + final String ERROR_MESSAGE = (String) request.getAttribute(org.mortbay.jetty.servlet.ServletHandler.__J_S_ERROR_MESSAGE); + if (ERROR_CODE != null && ERROR_MESSAGE != null) { + // this is deprecated but we don't want sendError() + response.setStatus(ERROR_CODE.intValue(), ERROR_MESSAGE); + } + // If it can't find the iframe or viewtheme.jsp I wonder if the whole thing blows up... +%> + +I2P Router Console + +<%@include file="css.jsp" %> + + +<% +if (System.getProperty("router.consoleNonce") == null) { + System.setProperty("router.consoleNonce", new java.util.Random().nextLong() + ""); +} +%> +<%@include file="summary.jsp" %> +

<%=ERROR_CODE%> <%=ERROR_MESSAGE%>

+
+The Router Console page <%=ERROR_URI%> was not found. +
+ + diff --git a/apps/routerconsole/jsp/web.xml b/apps/routerconsole/jsp/web.xml index 7a8e431ce..a0436d305 100644 --- a/apps/routerconsole/jsp/web.xml +++ b/apps/routerconsole/jsp/web.xml @@ -21,4 +21,8 @@ index.html index.jsp + + 404 + /error.jsp +