public String pic() throws Exception {
   Enterprise en = (Enterprise) ActionContext.getContext().getSession().get("user");
   int id = en.getId();
   String pictures = enterpriseService.getEnPhotos(id);
   result = new HashMap<String, Object>();
   result.put("result", pictures);
   return SUCCESS;
 }
 public String changepassword() throws Exception {
   session = ActionContext.getContext().getSession();
   Enterprise enterpise = (Enterprise) session.get("user");
   int id = enterpise.getId();
   String password = enterpriseService.getEnterpriseDAO().findById(id).getPassword();
   System.out.println(password + "---------------------");
   System.out.println(oldpassword + "----------------");
   System.out.println(newpassword + "---------------------");
   System.out.println(temppassword + "---------------------");
   if (!password.equals(oldpassword)) {
     //			System.out.println("old---------------------");
     return "passworderror";
   }
   if (!newpassword.equals(temppassword)) {
     //			System.out.println("new---------------------");
     return "newerror";
   }
   //		System.out.println(enterpise.getEmail());
   enterpriseService.savePassword(enterpise.getId(), newpassword);
   //		System.out.println(enterprise.getId()+"------------------");
   return SUCCESS;
 }