1. 쿠키 심기
Cookie cookie = new Cookie(name, value);
cookie.setMaxAge(limit);
cookie.setPath("/");
response.addCookie(cookie);
2.쿠키 얻기
Cookie[] cookies = request.getCookies();
String str = "";
if(cookies!=null){
for(int i=0;i<cookies.length;i++){
if(ckname.equals(cookies[i].getName())){
str = URLDecoder.decode(cookies[i].getValue(),"utf-8");
}//if
}//for
}//if
Cookie cookie = new Cookie(name, value);
cookie.setMaxAge(limit);
cookie.setPath("/");
response.addCookie(cookie);
2.쿠키 얻기
Cookie[] cookies = request.getCookies();
String str = "";
if(cookies!=null){
for(int i=0;i<cookies.length;i++){
if(ckname.equals(cookies[i].getName())){
str = URLDecoder.decode(cookies[i].getValue(),"utf-8");
}//if
}//for
}//if