diff --git a/apps/routerconsole/jsp/console.jsp b/apps/routerconsole/jsp/console.jsp new file mode 100644 index 000000000..d9adf1c00 --- /dev/null +++ b/apps/routerconsole/jsp/console.jsp @@ -0,0 +1,65 @@ +<%@page contentType="text/html"%> +<%@page pageEncoding="UTF-8"%> + + + +<%@include file="css.jsi" %> +<%=intl.title("home")%> + +<% + String consoleNonce = System.getProperty("router.consoleNonce"); + if (consoleNonce == null) { + consoleNonce = Long.toString(new java.util.Random().nextLong()); + System.setProperty("router.consoleNonce", consoleNonce); + } +%> + +<%@include file="summary.jsi" %>

<%=intl._("I2P Router Console")%>

+
+ + " /> +<% + if (newshelper.shouldShowNews()) { + java.io.File fpath = new java.io.File(net.i2p.I2PAppContext.getGlobalContext().getRouterDir(), "docs/news.xml"); +%> + + + +
+<% + } // shouldShowNews() +%> + + " /> +
+
+ +
+
+ English + عربية + 中文 + Danish + Deutsch + Eesti + Español + Suomi + Français
+ Italiano + Nederlands + Polski + Português + Русский + Svenska + Ukrainian + Tiếng Việt +
+ +

<%=intl._("Welcome to I2P")%>

+
+ <% java.io.File fpath = new java.io.File(net.i2p.I2PAppContext.getGlobalContext().getBaseDir(), "docs/readme.html"); %> + + + " /> + +
diff --git a/apps/routerconsole/jsp/index.jsp b/apps/routerconsole/jsp/index.jsp index d9adf1c00..b87cf0a1e 100644 --- a/apps/routerconsole/jsp/index.jsp +++ b/apps/routerconsole/jsp/index.jsp @@ -1,65 +1,18 @@ -<%@page contentType="text/html"%> +<%@page contentType="text/plain"%> <%@page pageEncoding="UTF-8"%> - - - -<%@include file="css.jsi" %> -<%=intl.title("home")%> - <% - String consoleNonce = System.getProperty("router.consoleNonce"); - if (consoleNonce == null) { - consoleNonce = Long.toString(new java.util.Random().nextLong()); - System.setProperty("router.consoleNonce", consoleNonce); - } + response.setStatus(302, "Moved"); + String req = request.getRequestURI(); + if (req.endsWith("index")) + req = req.substring(0, req.length() - 5); + else if (req.endsWith("index.jsp")) + req = req.substring(0, req.length() - 9); + if (!req.endsWith("/")) + req += '/'; + boolean oldHome = net.i2p.I2PAppContext.getGlobalContext().getBooleanProperty("routerconsole.oldHomePage"); + if (oldHome) + req += "console"; + else + req += "home"; + response.setHeader("Location", req); %> - -<%@include file="summary.jsi" %>

<%=intl._("I2P Router Console")%>

-
- - " /> -<% - if (newshelper.shouldShowNews()) { - java.io.File fpath = new java.io.File(net.i2p.I2PAppContext.getGlobalContext().getRouterDir(), "docs/news.xml"); -%> - - - -
-<% - } // shouldShowNews() -%> - - " /> -
-
- -
-
- English - عربية - 中文 - Danish - Deutsch - Eesti - Español - Suomi - Français
- Italiano - Nederlands - Polski - Português - Русский - Svenska - Ukrainian - Tiếng Việt -
- -

<%=intl._("Welcome to I2P")%>

-
- <% java.io.File fpath = new java.io.File(net.i2p.I2PAppContext.getGlobalContext().getBaseDir(), "docs/readme.html"); %> - - - " /> - -