1 package org.cacert.gigi.pages.wot;
3 import java.io.IOException;
4 import java.util.HashMap;
6 import javax.servlet.http.HttpServletRequest;
7 import javax.servlet.http.HttpServletResponse;
9 import org.cacert.gigi.dbObjects.User;
10 import org.cacert.gigi.output.template.Form;
11 import org.cacert.gigi.pages.Page;
12 import org.cacert.gigi.util.AuthorizationContext;
14 public class MyListingPage extends Page {
16 public static final String PATH = "/wot/listing";
18 public MyListingPage() {
23 public void doPost(HttpServletRequest req, HttpServletResponse resp) throws IOException {
24 if (Form.getForm(req, MyListingForm.class).submit(resp.getWriter(), req)) {
25 resp.sendRedirect(PATH);
28 super.doPost(req, resp);
32 public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException {
33 new MyListingForm(req, getUser(req)).output(resp.getWriter(), getLanguage(req), new HashMap<String, Object>());
37 public boolean isPermitted(AuthorizationContext ac) {
38 return ac != null && ac.getTarget() instanceof User;