@Override
    public ActionForward execute(ActionMapping mapping, ActionForm form,
            HttpServletRequest request, HttpServletResponse response)
            throws Exception {
        int leagueYear;
        
        String LeagueTitle = request.getParameter("title1");
        String LeagueSeason = request.getParameter("leagueSeason");
        String LeagueYear = request.getParameter("year");
        try {
            leagueYear = Integer.parseInt(LeagueYear);
        } catch (Exception e) {
            return mapping.findForward("error");
        }

        if (LeagueSeason.equals("") || LeagueYear.equals("") || LeagueTitle.equals("")) {
            return mapping.findForward("error");
        } 
        else {
            model.League league = new model.League(leagueYear, LeagueSeason, LeagueTitle);
           
           HttpSession session=request.getSession();
           session.setAttribute("league", league);
           
            
            new LeagueService().createleague(league);
            return mapping.findForward("sucess");
        }

    }