X-Git-Url: https://code.wpia.club/?a=blobdiff_plain;f=src%2Forg%2Fcacert%2Fgigi%2FGigi.java;h=3fa5d47a8313d86788f6c015830620d76cc33c0f;hb=a47365418ded7c5e8df26c2e92b76b3118a23654;hp=8cc076e19e6a3839b7e409fb44d69d1033ef4b80;hpb=7dec4cb4c324be3a48072b615ab0e30d6fd62ec2;p=gigi.git diff --git a/src/org/cacert/gigi/Gigi.java b/src/org/cacert/gigi/Gigi.java index 8cc076e1..3fa5d47a 100644 --- a/src/org/cacert/gigi/Gigi.java +++ b/src/org/cacert/gigi/Gigi.java @@ -23,6 +23,7 @@ import org.cacert.gigi.pages.Page; import org.cacert.gigi.pages.PolicyRedir; import org.cacert.gigi.pages.TestSecure; import org.cacert.gigi.pages.Verify; +import org.cacert.gigi.pages.account.MailAdd; import org.cacert.gigi.pages.account.MailCertificates; import org.cacert.gigi.pages.account.MailOverview; import org.cacert.gigi.pages.account.MyDetails; @@ -54,6 +55,7 @@ public class Gigi extends HttpServlet { pages.put(PolicyRedir.PATH, new PolicyRedir()); pages.put(MailOverview.DEFAULT_PATH, new MailOverview( "My email addresses")); + pages.put(MailAdd.DEFAULT_PATH, new MailAdd("Add new email")); String templ = ""; try (BufferedReader reader = new BufferedReader(new InputStreamReader( new FileInputStream(new File("templates/base.html"))))) { @@ -113,7 +115,9 @@ public class Gigi extends HttpServlet { } private Page getPage(String pathInfo) { - + if (pathInfo.endsWith("/")) { + pathInfo = pathInfo.substring(0, pathInfo.length() - 1); + } Page page = pages.get(pathInfo); if (page != null) { return page;