diff --git a/apps/i2ptunnel/jsp/edit.jsp b/apps/i2ptunnel/jsp/edit.jsp index 2da356e9cdc95435eb61ad047eaedd957023dd0a..e35f23c0fb2cd1909c9334f4d16325766de912d3 100644 --- a/apps/i2ptunnel/jsp/edit.jsp +++ b/apps/i2ptunnel/jsp/edit.jsp @@ -1,13 +1,17 @@ -<%@page pageEncoding="UTF-8"%> -<%@page contentType="text/html" import="net.i2p.i2ptunnel.web.EditBean" %><% +<% + // NOTE: Do the header carefully so there is no whitespace before the <?xml... line + +%><%@page pageEncoding="UTF-8" +%><%@page contentType="text/html" import="net.i2p.i2ptunnel.web.EditBean" +%><% String tun = request.getParameter("tunnel"); if (tun != null) { try { int curTunnel = Integer.parseInt(tun); if (EditBean.staticIsClient(curTunnel)) { - %><jsp:include page="editClient.jsp" /><% + %><jsp:include page="editClient.jsp" /><% } else { - %><jsp:include page="editServer.jsp" /><% + %><jsp:include page="editServer.jsp" /><% } } catch (NumberFormatException nfe) { %>Invalid tunnel parameter<% @@ -16,9 +20,9 @@ String tun = request.getParameter("tunnel"); String type = request.getParameter("type"); int curTunnel = -1; if (EditBean.isClient(type)) { - %><jsp:include page="editClient.jsp" /><% + %><jsp:include page="editClient.jsp" /><% } else { - %><jsp:include page="editServer.jsp" /><% + %><jsp:include page="editServer.jsp" /><% } } %> diff --git a/apps/i2ptunnel/jsp/editServer.jsp b/apps/i2ptunnel/jsp/editServer.jsp index e7a28bcd3f87a1efc531ed161ff95c2bfa6b48ca..45e96f73d0000fdc7fa638124ab6a93325bd2e2d 100644 --- a/apps/i2ptunnel/jsp/editServer.jsp +++ b/apps/i2ptunnel/jsp/editServer.jsp @@ -188,7 +188,7 @@ </label> <textarea rows="1" style="height: 3em;" cols="60" readonly="readonly" id="localDestination" title="Read Only: Local Destination (if known)" wrap="off" spellcheck="false"><%=editBean.getDestinationBase64(curTunnel)%></textarea> <% if (!"".equals(editBean.getDestinationBase64(curTunnel))) { %> - <a href="/susidns/addressbook.jsp?book=private&hostname=<%=editBean.getTunnelName(curTunnel)%>&destination=<%=editBean.getDestinationBase64(curTunnel)%>#add"><%=intl._("Add to local addressbook")%></a> + <a href="/susidns/addressbook.jsp?book=private&hostname=<%=editBean.getTunnelName(curTunnel)%>&destination=<%=editBean.getDestinationBase64(curTunnel)%>#add"><%=intl._("Add to local addressbook")%></a> <% } %> </div> @@ -340,7 +340,7 @@ <label for="force" accesskey="c"> <%=intl._("Generate New Key")%>: </label> - <button id="controlSave" accesskey="S" class="control" type="submit" name="action" value="Generate" title="Generate New Key Now"><%=intl._("Generate")%></button> + <button accesskey="S" class="control" type="submit" name="action" value="Generate" title="Generate New Key Now"><%=intl._("Generate")%></button> <span class="comment"><%=intl._("(Tunnel must be stopped first)")%></span> </div> @@ -374,7 +374,7 @@ <div class="rowItem"> <div id="optionsField" class="rowItem"> - <label><%=intl._("Inbound connection limits (0=unlimited)")%><br><%=intl._("Per client")%>:</label> + <label><%=intl._("Inbound connection limits (0=unlimited)")%><br /><%=intl._("Per client")%>:</label> </div> <div id="portField" class="rowItem"> <label><%=intl._("Per minute")%>:</label> @@ -453,7 +453,6 @@ <div id="portField" class="rowItem"> <label><%=intl._("None")%></label> <input value="0" type="radio" id="startOnLoad" name="cert" title="No Certificate"<%=(editBean.getCert(curTunnel)==0 ? " checked=\"checked\"" : "")%> class="tickbox" /> - <span class="comment"></span> </div> <div id="portField" class="rowItem"> <label><%=intl._("Hashcash (effort)")%></label> @@ -465,13 +464,12 @@ <label for="force" accesskey="c"> <%=intl._("Hashcash Calc Time")%>: </label> - <button id="controlSave" accesskey="S" class="control" type="submit" name="action" value="Estimate" title="Estimate Calculation Time"><%=intl._("Estimate")%></button> + <button accesskey="S" class="control" type="submit" name="action" value="Estimate" title="Estimate Calculation Time"><%=intl._("Estimate")%></button> </div> <div id="hostField" class="rowItem"> <div id="portField" class="rowItem"> <label><%=intl._("Hidden")%></label> <input value="2" type="radio" id="startOnLoad" name="cert" title="Hidden Certificate"<%=(editBean.getCert(curTunnel)==2 ? " checked=\"checked\"" : "")%> class="tickbox" /> - <span class="comment"></span> </div> <div id="portField" class="rowItem"> <label for="signer" accesskey="c"> @@ -479,14 +477,13 @@ </label> <input value="3" type="radio" id="startOnLoad" name="cert" title="Signed Certificate"<%=(editBean.getCert(curTunnel)==3 ? " checked=\"checked\"" : "")%> class="tickbox" /> <input type="text" id="port" name="signer" size="50" title="Cert Signer" value="<%=editBean.getSigner(curTunnel)%>" class="freetext" /> - <span class="comment"></span> </div> </div> <div id="portField" class="rowItem"> <label for="force" accesskey="c"> <%=intl._("Modify Certificate")%>: </label> - <button id="controlSave" accesskey="S" class="control" type="submit" name="action" value="Modify" title="Force New Cert Now"><%=intl._("Modify")%></button> + <button accesskey="S" class="control" type="submit" name="action" value="Modify" title="Force New Cert Now"><%=intl._("Modify")%></button> <span class="comment"><%=intl._("(Tunnel must be stopped first)")%></span> </div> diff --git a/apps/i2ptunnel/jsp/index.jsp b/apps/i2ptunnel/jsp/index.jsp index a5e07c5329b2d245e8b88004853d7de66993b003..9b4149195037837fa17b2656b4cd57bbee50fed6 100644 --- a/apps/i2ptunnel/jsp/index.jsp +++ b/apps/i2ptunnel/jsp/index.jsp @@ -1,10 +1,13 @@ <% + // NOTE: Do the header carefully so there is no whitespace before the <?xml... line + // http://www.crazysquirrel.com/computing/general/form-encoding.jspx if (request.getCharacterEncoding() == null) request.setCharacterEncoding("UTF-8"); -%> -<%@page pageEncoding="UTF-8"%> -<%@page contentType="text/html" import="net.i2p.i2ptunnel.web.IndexBean"%><?xml version="1.0" encoding="UTF-8"?> + +%><%@page pageEncoding="UTF-8" +%><%@page contentType="text/html" import="net.i2p.i2ptunnel.web.IndexBean" +%><?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <jsp:useBean class="net.i2p.i2ptunnel.web.IndexBean" id="indexBean" scope="request" /> <jsp:setProperty name="indexBean" property="*" />