public String EditSurvey(){
		SurveyDAO surveydao=DAOFactory.getSurveyDAO(); 
		String sid=request.getParameter("Survey_id");
		Survey survey=surveydao.findSurvey(Long.valueOf(request.getParameter("Survey_id")));
		survey.setSName(StringUtil.encodeString(request.getParameter("Survey_name")));
		survey.setSAuthor(StringUtil.encodeString(request.getParameter("Survey_author")));
		survey.setSDesc(StringUtil.encodeString(request.getParameter("Survey_description")));
		SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");
		try {
			survey.setSExpireDate(sdf.parse(request.getParameter("Survey_ExpireDate")));
		} catch (ParseException e) {
			// out.println("wrong DATE format.please check it!");
		}
		survey.setSIsOpen(Boolean.valueOf(request.getParameter("Survey_isOpen")));
		if(request.getParameter("Survey_isImg")!=null){
			if(request.getParameter("imgfilepath")!=null)
			survey.setSImg(request.getParameter("imgfilepath"));
		}else
			survey.setSImg(null);
		
		if(request.getParameter("Survey_isPassword")!=null){
			survey.setSPassword(request.getParameter("Survey_isPassword"));
		}else
			survey.setSPassword(null);
		
		boolean ret=surveydao.updateSurvey(survey);
		if(ret==true){
			//response.sendRedirect("../admin/SurveyAdmin.jsp");
			return "success";
		}else{
			//response.sendRedirect("../admin/OpResult.jsp?op=SurveyEdit&ret=false");
			return "fail";
		}
	}