class SubscribeJsp {

    private static final Logger log = LoggerFactory.getLogger(SubscribeJsp.class);

    
    public SubscribeJsp() {
        super();
    }
    
    
    
    
    @ModelAttribute("allTypes")
    public SubscriptionType[] populateTypes() {
        return new SubscriptionType[] { SubscriptionType.ALL_EMAILS, SubscriptionType.DAILY_DIGEST };
    }

    
    @RequestMapping({"/subscribejsp"})
    public String showSubscription(final Subscription subscription) {
        return "subscribejsp";
    }
    
    
    
    @RequestMapping(value="/subscribejsp", params={"save"})
    public String subscribe(final Subscription subscription, final BindingResult bindingResult, final ModelMap model) {<FILL_FUNCTION_BODY>}

    
}

        if (bindingResult.hasErrors()) {
            return "subscribejsp";
        }
        log.info("JUST ADDED SUBSCRIPTION: " + subscription);
        model.clear();
        return "redirect:/subscribejsp";
    
<no_super_class>