]> WPIA git - gigi.git/blobdiff - src/org/cacert/gigi/Gigi.java
Fixed / path
[gigi.git] / src / org / cacert / gigi / Gigi.java
index 39af0f77d1fdbb9a87672d3ab506c8b7d4bfb217..a96396db15b49760b970430a79758fbf5209742b 100644 (file)
@@ -23,7 +23,9 @@ 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;
 import org.cacert.gigi.pages.main.RegisterPage;
 import org.cacert.gigi.pages.wot.AssurePage;
@@ -51,6 +53,9 @@ public class Gigi extends HttpServlet {
                pages.put(MyDetails.PATH, new MyDetails());
                pages.put(RegisterPage.PATH, new RegisterPage());
                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"))))) {
@@ -110,7 +115,9 @@ public class Gigi extends HttpServlet {
 
        }
        private Page getPage(String pathInfo) {
-
+               if (pathInfo.endsWith("/") && !pathInfo.equals("/")) {
+                       pathInfo = pathInfo.substring(0, pathInfo.length() - 1);
+               }
                Page page = pages.get(pathInfo);
                if (page != null) {
                        return page;