public String deletesite() throws Exception {

        try {
            Map session = ActionContext.getContext().getSession();
            setUser((User) session.get("User"));

            Publish cdel = (Publish) myDao.getDbsession().get(Publish.class, publishid);


            getMyDao().getDbsession().delete(cdel);

          
            Criteria crit = myDao.getDbsession().createCriteria(Publish.class);
            crit.add(Restrictions.eq("user", getUser()));
            crit.setMaxResults(20);

            sitelist = (List<Publish>) crit.list();
            addActionMessage("Site " + cdel.getSiteName() + " Successfully Removed");
            return "success";
        } catch (HibernateException e) {
            addActionError("Server  Error Please Try Again ");
            e.printStackTrace();
            return "error";
        } catch (NullPointerException ne) {

            addActionError("Server  Error Please Try Again ");
            ne.printStackTrace();
            return "error";
        } catch (Exception e) {

            addActionError("Server  Error Please Try Again ");
            e.printStackTrace();
            return "error";
        }

    }