diff --git a/apps/i2ptunnel/jsp/editClient.jsp b/apps/i2ptunnel/jsp/editClient.jsp index be48bb2b920ec72c912b40a8bd9e21672da7820e..2b69440ac1f290e065e42f6e8d40b13e29542540 100644 --- a/apps/i2ptunnel/jsp/editClient.jsp +++ b/apps/i2ptunnel/jsp/editClient.jsp @@ -29,7 +29,7 @@ <div id="pageHeader"> </div> - <form method="post" action="index.jsp"> + <form method="post" action="list"> <div id="tunnelEditPanel" class="panel"> <div class="header"> diff --git a/apps/i2ptunnel/jsp/editServer.jsp b/apps/i2ptunnel/jsp/editServer.jsp index 97a0a93c9c7eead98b070b8ccbfb2d57a6a57ac4..773d323a2bf9c88f5d683798b2e485e012f84e3b 100644 --- a/apps/i2ptunnel/jsp/editServer.jsp +++ b/apps/i2ptunnel/jsp/editServer.jsp @@ -29,7 +29,7 @@ <div id="pageHeader"> </div> - <form method="post" action="index.jsp"> + <form method="post" action="list"> <div id="tunnelEditPanel" class="panel"> <div class="header"> diff --git a/apps/i2ptunnel/jsp/index.html b/apps/i2ptunnel/jsp/index.html deleted file mode 100644 index ea1321105ebd70b339995c446e78b3377cff2f6b..0000000000000000000000000000000000000000 --- a/apps/i2ptunnel/jsp/index.html +++ /dev/null @@ -1,2 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><title>I2P Router Console</title></head> -<body><meta http-equiv="refresh" content="0;url=index.jsp" /><a href="index.jsp">Enter</a></body></html> diff --git a/apps/i2ptunnel/jsp/index.jsp b/apps/i2ptunnel/jsp/index.jsp index 8b7f8051eacbda8a738bdf28af0a93bb75e0a038..cf0d0067c39cf4551a8fe37a1dae821fa2cca46d 100644 --- a/apps/i2ptunnel/jsp/index.jsp +++ b/apps/i2ptunnel/jsp/index.jsp @@ -44,7 +44,7 @@ <div class="footer"> <div class="toolbox"> - <a class="control" href="index.jsp"><%=intl._("Refresh")%></a> + <a class="control" href="list"><%=intl._("Refresh")%></a> </div> </div> </div> @@ -53,7 +53,7 @@ <div class="header"></div> <div class="footer"> <div class="toolbox"> - <a class="control" href="index.jsp?nonce=<%=indexBean.getNextNonce()%>&action=Stop%20all"><%=intl._("Stop All")%></a> <a class="control" href="index.jsp?nonce=<%=indexBean.getNextNonce()%>&action=Start%20all"><%=intl._("Start All")%></a> <a class="control" href="index.jsp?nonce=<%=indexBean.getNextNonce()%>&action=Restart%20all"><%=intl._("Restart All")%></a> <a class="control" href="index.jsp?nonce=<%=indexBean.getNextNonce()%>&action=Reload%20configuration"><%=intl._("Reload Config")%></a> + <a class="control" href="list?nonce=<%=indexBean.getNextNonce()%>&action=Stop%20all"><%=intl._("Stop All")%></a> <a class="control" href="list?nonce=<%=indexBean.getNextNonce()%>&action=Start%20all"><%=intl._("Start All")%></a> <a class="control" href="list?nonce=<%=indexBean.getNextNonce()%>&action=Restart%20all"><%=intl._("Restart All")%></a> <a class="control" href="list?nonce=<%=indexBean.getNextNonce()%>&action=Reload%20configuration"><%=intl._("Reload Config")%></a> </div> </div> </div> @@ -89,7 +89,7 @@ %> <div class="nameField rowItem"> <label><%=intl._("Name")%>:</label> - <span class="text"><a href="edit.jsp?tunnel=<%=curServer%>" title="Edit Server Tunnel Settings for <%=indexBean.getTunnelName(curServer)%>"><%=indexBean.getTunnelName(curServer)%></a></span> + <span class="text"><a href="edit?tunnel=<%=curServer%>" title="Edit Server Tunnel Settings for <%=indexBean.getTunnelName(curServer)%>"><%=indexBean.getTunnelName(curServer)%></a></span> </div> <div class="previewField rowItem"> <label><%=intl._("Points at")%>:</label> @@ -125,17 +125,17 @@ switch (indexBean.getTunnelStatus(curServer)) { case IndexBean.STARTING: %><div class="statusStarting text"><%=intl._("Starting...")%></div> - <a class="control" title="Stop this Tunnel" href="index.jsp?nonce=<%=indexBean.getNextNonce()%>&action=stop&tunnel=<%=curServer%>"><%=intl._("Stop")%></a> + <a class="control" title="Stop this Tunnel" href="list?nonce=<%=indexBean.getNextNonce()%>&action=stop&tunnel=<%=curServer%>"><%=intl._("Stop")%></a> <% break; case IndexBean.RUNNING: %><div class="statusRunning text"><%=intl._("Running")%></div> - <a class="control" title="Stop this Tunnel" href="index.jsp?nonce=<%=indexBean.getNextNonce()%>&action=stop&tunnel=<%=curServer%>"><%=intl._("Stop")%></a> + <a class="control" title="Stop this Tunnel" href="list?nonce=<%=indexBean.getNextNonce()%>&action=stop&tunnel=<%=curServer%>"><%=intl._("Stop")%></a> <% break; case IndexBean.NOT_RUNNING: %><div class="statusNotRunning text"><%=intl._("Stopped")%></div> - <a class="control" title="Start this Tunnel" href="index.jsp?nonce=<%=indexBean.getNextNonce()%>&action=start&tunnel=<%=curServer%>"><%=intl._("Start")%></a> + <a class="control" title="Start this Tunnel" href="list?nonce=<%=indexBean.getNextNonce()%>&action=start&tunnel=<%=curServer%>"><%=intl._("Start")%></a> <% break; } @@ -157,7 +157,7 @@ </div> <div class="footer"> - <form id="addNewServerTunnelForm" action="edit.jsp"> + <form id="addNewServerTunnelForm" action="edit"> <div class="toolbox"> <label><%=intl._("New server tunnel")%>:</label> @@ -209,7 +209,7 @@ %> <div class="nameField rowItem"> <label><%=intl._("Name")%>:</label> - <span class="text"><a href="edit.jsp?tunnel=<%=curClient%>" title="Edit Tunnel Settings for <%=indexBean.getTunnelName(curClient)%>"><%=indexBean.getTunnelName(curClient)%></a></span> + <span class="text"><a href="edit?tunnel=<%=curClient%>" title="Edit Tunnel Settings for <%=indexBean.getTunnelName(curClient)%>"><%=indexBean.getTunnelName(curClient)%></a></span> </div> <div class="portField rowItem"> <label><%=intl._("Port")%>:</label> @@ -229,22 +229,22 @@ switch (indexBean.getTunnelStatus(curClient)) { case IndexBean.STARTING: %><div class="statusStarting text"><%=intl._("Starting...")%></div> - <a class="control" title="Stop this Tunnel" href="index.jsp?nonce=<%=indexBean.getNextNonce()%>&action=stop&tunnel=<%=curClient%>"><%=intl._("Stop")%></a> + <a class="control" title="Stop this Tunnel" href="list?nonce=<%=indexBean.getNextNonce()%>&action=stop&tunnel=<%=curClient%>"><%=intl._("Stop")%></a> <% break; case IndexBean.STANDBY: %><div class="statusStarting text"><%=intl._("Standby")%></div> - <a class="control" title="Stop this Tunnel" href="index.jsp?nonce=<%=indexBean.getNextNonce()%>&action=stop&tunnel=<%=curClient%>"><%=intl._("Stop")%></a> + <a class="control" title="Stop this Tunnel" href="list?nonce=<%=indexBean.getNextNonce()%>&action=stop&tunnel=<%=curClient%>"><%=intl._("Stop")%></a> <% break; case IndexBean.RUNNING: %><div class="statusRunning text"><%=intl._("Running")%></div> - <a class="control" title="Stop this Tunnel" href="index.jsp?nonce=<%=indexBean.getNextNonce()%>&action=stop&tunnel=<%=curClient%>"><%=intl._("Stop")%></a> + <a class="control" title="Stop this Tunnel" href="list?nonce=<%=indexBean.getNextNonce()%>&action=stop&tunnel=<%=curClient%>"><%=intl._("Stop")%></a> <% break; case IndexBean.NOT_RUNNING: %><div class="statusNotRunning text"><%=intl._("Stopped")%></div> - <a class="control" title="Start this Tunnel" href="index.jsp?nonce=<%=indexBean.getNextNonce()%>&action=start&tunnel=<%=curClient%>"><%=intl._("Start")%></a> + <a class="control" title="Start this Tunnel" href="list?nonce=<%=indexBean.getNextNonce()%>&action=start&tunnel=<%=curClient%>"><%=intl._("Start")%></a> <% break; } @@ -285,7 +285,7 @@ </div> <div class="footer"> - <form id="addNewClientTunnelForm" action="edit.jsp"> + <form id="addNewClientTunnelForm" action="edit"> <div class="toolbox"> <label><%=intl._("New client tunnel")%>:</label> diff --git a/apps/i2ptunnel/jsp/web.xml b/apps/i2ptunnel/jsp/web.xml index a814e9a87b02057116d5f3f1347747e052e4d044..d333d29367bbf91160e86d6bc685e6232e07221a 100644 --- a/apps/i2ptunnel/jsp/web.xml +++ b/apps/i2ptunnel/jsp/web.xml @@ -5,6 +5,19 @@ <web-app> <!-- precompiled servlets --> + + <!-- yeah we could do this in a handler but this is easier --> + <servlet-mapping> + <servlet-name>net.i2p.i2ptunnel.jsp.index_jsp</servlet-name> + <!-- this becomes the default so it also covers /index and /index.html --> + <url-pattern>/</url-pattern> + </servlet-mapping> + + <servlet-mapping> + <servlet-name>net.i2p.i2ptunnel.jsp.edit_jsp</servlet-name> + <url-pattern>/edit</url-pattern> + </servlet-mapping> + <session-config> <session-timeout> 30 diff --git a/apps/routerconsole/java/src/net/i2p/router/web/SummaryBarRenderer.java b/apps/routerconsole/java/src/net/i2p/router/web/SummaryBarRenderer.java index ffd211810946ff0133f3a0e36542a0f24b6aaa9b..5fc2000c5a7bf299cd9accbb22ca90f899ffaf91 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/SummaryBarRenderer.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/SummaryBarRenderer.java @@ -143,7 +143,7 @@ public class SummaryBarRenderer { .append(_("Stats")) .append("</a>\n" + - "<a href=\"/i2ptunnel/index.jsp\" target=\"_blank\" title=\"") + "<a href=\"/i2ptunnel/\" target=\"_blank\" title=\"") .append(_("Local Destinations")) .append("\">") .append(_("I2PTunnel")) diff --git a/apps/routerconsole/java/src/net/i2p/router/web/SummaryHelper.java b/apps/routerconsole/java/src/net/i2p/router/web/SummaryHelper.java index fe41f7f2786ad472aa49d9dd5ff61f78296a0e9b..c6b9a593a5ae61ee07634f47baf53e56c0bdf83d 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/SummaryHelper.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/SummaryHelper.java @@ -362,7 +362,7 @@ public class SummaryHelper extends HelperBase { List<Destination> clients = new ArrayList(_context.clientManager().listClients()); StringBuilder buf = new StringBuilder(512); - buf.append("<h3><a href=\"/i2ptunnel/index.jsp\" target=\"_blank\" title=\"").append(_("Add/remove/edit & control your client and server tunnels")).append("\">").append(_("Local Destinations")).append("</a></h3><hr><div class=\"tunnels\">"); + buf.append("<h3><a href=\"/i2ptunnel/\" target=\"_blank\" title=\"").append(_("Add/remove/edit & control your client and server tunnels")).append("\">").append(_("Local Destinations")).append("</a></h3><hr><div class=\"tunnels\">"); if (!clients.isEmpty()) { Collections.sort(clients, new AlphaComparator()); buf.append("<table>"); diff --git a/apps/routerconsole/jsp/configkeyring.jsp b/apps/routerconsole/jsp/configkeyring.jsp index 01c332b4957544e84bdc0af0c6924dc89783d442..84cd543845ba7e2d8458740ec2dd463c6e5c52a3 100644 --- a/apps/routerconsole/jsp/configkeyring.jsp +++ b/apps/routerconsole/jsp/configkeyring.jsp @@ -32,7 +32,7 @@ <input type="hidden" name="nonce" value="<%=System.getProperty("net.i2p.router.web.ConfigKeyringHandler.nonce")%>" > <h3><%=intl._("Manual Keyring Addition")%></h3><p> <%=intl._("Enter keys for encrypted remote destinations here.")%> - <%=intl._("Keys for local destinations must be entered on the")%> <a href="i2ptunnel/index.jsp"><%=intl._("I2PTunnel page")%></a>. + <%=intl._("Keys for local destinations must be entered on the")%> <a href="i2ptunnel/"><%=intl._("I2PTunnel page")%></a>. </p> <div class="wideload"> <p><table><tr>