    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        String action = req.getParameter(SUBMIT_ACTION);
        String id = req.getParameter(ID);
        String sbChannelName = req.getParameter(SB_ID);
        String youSeeName = req.getParameter(UC_ID);
        String displayName = req.getParameter(DISPLAY_NAME);
        Date fromDate;
        Date toDate;
        String fromDateS = req.getParameter(FROM_DATE);
        if (fromDateS != null || "".equals(fromDateS)) {
            fromDateS = "2012-05-01 00:00";
        }
        try {
            fromDate = JAVA_DATE_FORMAT.parse(fromDateS);
            fromDate.setSeconds(0);
        } catch (ParseException e) {
            throw new RuntimeException("Could not parse '" +
                    fromDateS + "'");
        }
        String toDateS = req.getParameter(TO_DATE);
        if (toDateS != null || "".equals(toDateS)) {
            toDateS = "3000-01-01 00:00";
        }
        try {
            toDate = JAVA_DATE_FORMAT.parse(toDateS);
            toDate.setSeconds(0);
        } catch (ParseException e) {
            throw new RuntimeException("Could not parse '" +
                    toDateS + "'");
        }
        YouSeeChannelMapping mapping = new YouSeeChannelMapping();
        if (id != null && !"".equals(id)) {
            mapping.setId(Long.parseLong(id));
        }
        mapping.setDisplayName(displayName);
        mapping.setFromDate(fromDate);
        mapping.setToDate(toDate);
        mapping.setSbChannelId(sbChannelName);
        mapping.setYouSeeChannelId(youSeeName);
        if (CREATE.equals(action)) {
            try {
                service.create(mapping);
            } catch (ServiceException e) {
                req.setAttribute("error", e);
            }
        } else if (UPDATE.equals(action)) {
              try {
                service.update(mapping);
            } catch (ServiceException e) {
                req.setAttribute("error", e);
            }
        } else if (DELETE.equals(action)) {
              try {
                service.delete(mapping);
            } catch (ServiceException e) {
                req.setAttribute("error", e);
            }
        }
        req.setAttribute("page_attribute", "you_see_channel_mapping.jsp");
        req.getSession().getServletContext().getRequestDispatcher("/index.jsp").forward(req, resp);
    }

    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        String action = req.getParameter(SUBMIT_ACTION);
        String id = req.getParameter(ID);
        String sbChannelName = req.getParameter(SB_ID);
        String youSeeName = req.getParameter(UC_ID);
        String displayName = req.getParameter(DISPLAY_NAME);
        Date fromDate;
        Date toDate;
        String fromDateS = req.getParameter(FROM_DATE);
        if (fromDateS == null || "".equals(fromDateS)) {
            fromDateS = "2012-05-01 00:00";
        }
        try {
            fromDate = JAVA_DATE_FORMAT.parse(fromDateS);
            fromDate.setSeconds(0);
        } catch (ParseException e) {
            throw new RuntimeException("Could not parse '" +
                    fromDateS + "'");
        }
        String toDateS = req.getParameter(TO_DATE);
        if (toDateS == null || "".equals(toDateS)) {
            toDateS = "3000-01-01 00:00";
        }
        try {
            toDate = JAVA_DATE_FORMAT.parse(toDateS);
            toDate.setSeconds(0);
        } catch (ParseException e) {
            throw new RuntimeException("Could not parse '" +
                    toDateS + "'");
        }
        YouSeeChannelMapping mapping = new YouSeeChannelMapping();
        if (id != null && !"".equals(id)) {
            mapping.setId(Long.parseLong(id));
        }
        mapping.setDisplayName(displayName);
        mapping.setFromDate(fromDate);
        mapping.setToDate(toDate);
        mapping.setSbChannelId(sbChannelName);
        mapping.setYouSeeChannelId(youSeeName);
        if (CREATE.equals(action)) {
            try {
                service.create(mapping);
            } catch (ServiceException e) {
                req.setAttribute("error", e);
            }
        } else if (UPDATE.equals(action)) {
              try {
                service.update(mapping);
            } catch (ServiceException e) {
                req.setAttribute("error", e);
            }
        } else if (DELETE.equals(action)) {
              try {
                service.delete(mapping);
            } catch (ServiceException e) {
                req.setAttribute("error", e);
            }
        }
        req.setAttribute("page_attribute", "you_see_channel_mapping.jsp");
        req.getSession().getServletContext().getRequestDispatcher("/index.jsp").forward(req, resp);
    }
