페이지를 호출 할 때
@RequestMapping(value = "/{classify}/detail/{seq}", method = RequestMethod.GET)
	public String selectBoard(@PathVariable String seq,@PathVariable String classify,
 Model model,HttpServletRequest req,HttpServletResponse res) {
	     // 저장된 쿠키 불러오기
	    Cookie cookies[] = req.getCookies();
	    Map map = new HashMap();
	    if(req.getCookies() != null){
	    for (int i = 0; i < cookies.length; i++) {
	    Cookie obj = cookies[i];
	    map.put(obj.getName(),obj.getValue());
	    }
	    }
	    // 저장된 쿠키중에 read_count 만 불러오기
	    String readCount = (String) map.get("read_count");
	     // 저장될 새로운 쿠키값 생성
	    String newReadCount = "|" + seq;
	    // 저장된 쿠키에 새로운 쿠키값이 존재하는 지 검사
	    if ( StringUtils.indexOfIgnoreCase(readCount, newReadCount) == -1 ) {
	          // 없을 경우 쿠키 생성
	          Cookie cookie = new Cookie("read_count", readCount + newReadCount);
	         
	          res.addCookie(cookie);
	          boardDAOService.updateHit(Integer.parseInt(seq)); // 업데이트 실행
	    }
  .
  .
  .
 
 
출처 - http://syaku.tistory.com/275