pages.put("/", new MainPage("CACert - Home"));
pages.put("/secure", new TestSecure());
pages.put(Verify.PATH, new Verify());
- pages.put(AssurePage.PATH, new AssurePage());
+ pages.put(AssurePage.PATH + "/*", new AssurePage());
pages.put(MailCertificates.PATH, new MailCertificates());
pages.put(MyDetails.PATH, new MyDetails());
pages.put(RegisterPage.PATH, new RegisterPage());
new FileInputStream(new File("templates/base.html"))))) {
String tmp;
while ((tmp = reader.readLine()) != null) {
- templ += tmp;
+ templ += tmp + "\n";
}
baseTemplate = templ.split("\\$content\\$");
} catch (Exception e) {
}
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;