@Override
    public String execute() throws Exception {

        try {
            Date date = new Date();
            Map session = ActionContext.getContext().getSession();
            User user = (User) session.get("User");

            Campaign camp = new Campaign(user, campaignname);

            camp.setStartDate(startdate);
            camp.setEndDate(enddate);
            camp.setDialyBudget(dailybdgt);
            camp.setDeliveryMethod(deliverytype);
            camp.setPromoType(promotype);
            camp.setNote(note);
            camp.setCreationTime(date);
            getMyDao().getDbsession().saveOrUpdate(camp);
            Criteria camp_crit = myDao.getDbsession().createCriteria(Campaign.class);
            camp_crit.add(Restrictions.and(Restrictions.eq("user", user), Restrictions.eq("campaignName", campaignname)));
            camp_crit.add(Restrictions.and(Restrictions.eq("startDate", startdate), Restrictions.eq("endDate", enddate)));
            camp_crit.add(Restrictions.eq("dialyBudget", dailybdgt));
            camp_crit.add(Restrictions.eq("note", note));
            camp_crit.setMaxResults(1);
            Campaign n_camp = (Campaign) (camp_crit.list().get(0));
            System.out.println("-----------Campaign id---- " + n_camp.getCampaignId());
            session.put("campa", n_camp);
            return "success";

        } catch (HibernateException e) {
            addActionError("Server  Error Please Recheck All Fields ");
            e.printStackTrace();
            return "error";
        } catch (NullPointerException ne) {

            addActionError("Server  Error Please Recheck All Fields ");
            ne.printStackTrace();
            return "error";
        } catch (Exception e) {

            addActionError("Server  Error Please Recheck All Fields ");
            e.printStackTrace();
            return "error";
        }


    }