@Override
    public String execute() throws Exception {
        try {
            Map session = ActionContext.getContext().getSession();
            setUser((User) session.get("User"));
            Date date = new Date();
            System.out.println("--------------------------------------------------" + existrate);
            System.out.println("------------------------------------------------------" + newrt);
            System.out.println("-------------------------------------------------------" + cfrt);
            if (existrate != null) {
                Adrate ad = (Adrate) myDao.getDbsession().get(Adrate.class, 1);
                ad.setCurrentRate(newrt);
                ad.setOldRate(existrate);
                ad.setDateChange(date);
                myDao.getDbsession().update(ad);
                // myDao.getDbsession().saveOrUpdate(ad);
                addActionMessage("New Rate Successfully Changed");
                return "success";
            } else {
                old = (Adrate) myDao.getDbsession().get(Adrate.class, 1);
                existrate = old.getCurrentRate();
                Adrate ad = (Adrate) myDao.getDbsession().get(Adrate.class, 1);
                ad.setCurrentRate(newrt);
                ad.setOldRate(existrate);
                ad.setDateChange(date);
                myDao.getDbsession().update(ad);
                addActionMessage("New Rate Successfully Changed");
                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";
        }
    }