@Override
protected ModelAndView onSubmit(HttpServletRequest req,
HttpServletResponse arg1, Object obj, BindException arg3)
throws Exception {
MailingListCommand comm = (MailingListCommand) obj;
comm.setUserAgent(req.getHeader("User-Agent"));
comm.setReferer(req.getHeader("Referer"));
comm.setHost(req.getHeader("Host"));
log.debug("email: " + comm.getEmail());
log.debug("user-agent: " + comm.getUserAgent());
invitationService.requestInvitation(comm);
String successStr = "Thanks "
+ comm.getEmail()
+ " we'll let you know when you can sign up for an account.";
Map<String, Object> model = new HashMap<String, Object>();
model.put("message", successStr);
model.put("command", new MailingListCommand());
return new ModelAndView(getSuccessView(), model);
}