- HashMap<String, Object> vars = new HashMap<String, Object>();
- vars.put("DoB", ds);
- t.output(out, getLanguage(req), vars);
+ String pi = req.getPathInfo().substring(PATH.length());
+ if (pi.length() > 1) {
+ User myself = LoginPage.getUser(req);
+ int mid = Integer.parseInt(pi.substring(1));
+
+ if (!Notary.checkAssuranceIsPossible(myself, new User(mid), out)) {
+ return;
+ }
+ HttpSession hs = req.getSession();
+ AssuranceForm form = (AssuranceForm) hs.getAttribute(SESSION);
+ if (form == null || form.assuree.getId() != mid) {
+ form = new AssuranceForm(mid);
+ hs.setAttribute(SESSION, form);
+ }
+
+ form.output(out, getLanguage(req), new HashMap<String, Object>());;
+ } else {
+ HashMap<String, Object> vars = new HashMap<String, Object>();
+ vars.put("DoB", ds);
+ t.output(out, getLanguage(req), vars);
+ }