diff --git a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/web/WizardBean.java b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/web/WizardBean.java new file mode 100644 index 000000000..afac4235e --- /dev/null +++ b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/web/WizardBean.java @@ -0,0 +1,24 @@ +package net.i2p.i2ptunnel.web; + +/** + * A temporary data holder for the wizard pages + * + * Warning - This class is not part of the i2ptunnel API, and at some point + * it will be moved from the jar to the war. + * Usage by classes outside of i2ptunnel.war is deprecated. + */ +public class WizardBean extends IndexBean { + private boolean _isClient; + public WizardBean() { super(); } + + /** + * Whether the tunnel being set up is a client tunnel or not. + * + */ + public void setIsClient(String isClient) { + _isClient = Boolean.valueOf(isClient); + } + public boolean getIsClient() { + return _isClient; + } +} diff --git a/apps/i2ptunnel/jsp/web.xml b/apps/i2ptunnel/jsp/web.xml index d333d2936..d8d51c823 100644 --- a/apps/i2ptunnel/jsp/web.xml +++ b/apps/i2ptunnel/jsp/web.xml @@ -18,6 +18,11 @@ /edit + + net.i2p.i2ptunnel.jsp.wizard_jsp + /wizard + + 30 diff --git a/apps/i2ptunnel/jsp/wizard.jsp b/apps/i2ptunnel/jsp/wizard.jsp new file mode 100644 index 000000000..5f77e6ae0 --- /dev/null +++ b/apps/i2ptunnel/jsp/wizard.jsp @@ -0,0 +1,89 @@ +<% + // NOTE: Do the header carefully so there is no whitespace before the <%@page pageEncoding="UTF-8" +%><%@page contentType="text/html" import="net.i2p.i2ptunnel.web.WizardBean" +%> + + + +<% String pageStr = request.getParameter("page"); + int curPage = 1; + if (pageStr != null) { + try { + curPage = Integer.parseInt(pageStr); + if (curPage > 7 || curPage <= 0) { + curPage = 1; + } + } catch (NumberFormatException nfe) { + curPage = 1; + } + } +%> + + + <%=intl._("I2P Tunnel Manager - Tunnel Creation Wizard")%> + + + + + + <% if (wizardBean.allowCSS()) { + %> + + <% } + %> + + + + +
+ +
+
+ <% + if (curPage == 1) { + %>

<%=intl._("Page 1")%>

<% + } %> + " /> + +
+ +
+
+
+ + <% + if (curPage == 1) { + %>
+ + + + + +
<% + } else { + %><% + } %> +
+ +
+
+ +
+ +
+ + + +