- VerificationForm form = Form.getForm(req, VerificationForm.class);
- if (form.submitProtected(resp.getWriter(), req)) {
- String type = form.type;
- HashMap<String, Object> data = new HashMap<>();
- data.put("subject", form.subject);
- PrintWriter out = resp.getWriter();
- if ("email".equals(type)) {
- emailAddressVerified.output(out, getLanguage(req), data);
- } else if ("domain".equals(type)) {
- domainVerified.output(out, getLanguage(req), data);
- }
+ if (Form.printFormErrors(req, resp.getWriter())) {
+ Form.getForm(req, VerificationForm.class).output(resp.getWriter(), getLanguage(req), new HashMap<String, Object>());