- int i = Integer.parseInt(pi.substring(PATH.length()));
- Domain d = Domain.getById(i);
- if (u.getId() != d.getOwner().getId()) {
- return;
- }
- int reping = Integer.parseInt(req.getParameter("configId"));
- DomainPingConfiguration dpc = DomainPingConfiguration.getById(reping);
- if (dpc.getTarget() != d) {
+ try {
+ if (req.getParameter("configId") != null) {
+ if ( !Form.getForm(req, DomainPinglogForm.class).submit(resp.getWriter(), req)) {
+ // error?
+ }
+
+ } else {
+ if ( !Form.getForm(req, PingConfigForm.class).submit(resp.getWriter(), req)) {
+
+ }
+ }
+ } catch (GigiApiException e) {
+ e.format(resp.getWriter(), getLanguage(req));