@RequestMapping(value = "/write", method = RequestMethod.POST)
	public String writeData(Model model, HttpServletRequest req, HttpServletResponse resp) throws IOException{
		Date date = new Date();
		DateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss");
		String formattedDate = dateFormat.format(date);
		
		logger.info("db write action");
		
		PrintWriter out = resp.getWriter();
		
		String email = req.getParameter("email");
		String password = req.getParameter("passwd");
		String content = req.getParameter("content");
		
		if(email!="" && password!=""){
			Pattern p = Pattern.compile("^[_A-Za-z0-9-\\+]+(\\.[_A-Za-z0-9-]+)*@[A-Za-z0-9-]+(\\.[A-Za-z0-9]+)*(\\.[A-Za-z]{2,})$");
			Matcher m = p.matcher(email);
			if(!m.matches()){
				out.println("<script>alert('올바른 이메일 주소를 입력하세요');</script>");
			}
			else{
				if(objDao.getObj(email)!=null){
					out.println("<script>alert('이메일이 중복됩니다');</script>");
					out.flush();
					return "home";
				}
				
				VisitorObj add = new VisitorObj(email,password,content);
				objDao.insert(add);
				logger.info("db objDao insert work");
				TimeObj addT = new TimeObj(email,formattedDate,"");
				timeDao.insert(addT);
				logger.info("db timeDao insert work");
			}
		}
		else{
			out.println("<script>alert('이메일과 비밀번호를 입력하세요');</script>");
		}
		
		list = objDao.searchAll();
		model.addAttribute("lists",list);
		
		out.flush();
		return "home";
	}