]> WPIA git - gigi.git/blob - src/org/cacert/gigi/pages/account/ChangePasswordPage.java
805c72d923958c0297e28134640d4d5dd1942482
[gigi.git] / src / org / cacert / gigi / pages / account / ChangePasswordPage.java
1 package org.cacert.gigi.pages.account;
2
3 import java.io.IOException;
4 import java.util.HashMap;
5
6 import javax.servlet.http.HttpServletRequest;
7 import javax.servlet.http.HttpServletResponse;
8
9 import org.cacert.gigi.output.Form;
10 import org.cacert.gigi.pages.LoginPage;
11 import org.cacert.gigi.pages.Page;
12
13 public class ChangePasswordPage extends Page {
14
15     public static final String PATH = "/account/password";
16
17     public ChangePasswordPage() {
18         super("Change Password");
19     }
20
21     @Override
22     public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException {
23         new ChangeForm(req, LoginPage.getUser(req)).output(resp.getWriter(), getLanguage(req), new HashMap<String, Object>());
24     }
25
26     @Override
27     public void doPost(HttpServletRequest req, HttpServletResponse resp) throws IOException {
28         ChangeForm f = Form.getForm(req, ChangeForm.class);
29         f.submit(resp.getWriter(), req);
30     }
31
32 }