336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.
- 쿠키생성
Cookie cookie = new Cookie("user", "shy");
- 클라이언트 컴퓨터에 파일형태로 저장
response.addCookie(cookie);
- cookie값은 배열형태로 반환
Cookie[] cookieValue = request.getCookies();
- 조회(Name, Value)
for(int i=0 ; i<cookieValue.length ; i++){
System.out.println("Cookie Name" + cookieValue[i].getName());
System.out.println("Cookie Value" + cookieValue[i].getValue());
}
- 유효기간 정하기(초단위, 0은 쿠키삭제, 음수일 경우 브라우저 종료시 쿠키 삭제)
cookieValue.setMaxAge(60 * 5)
'JAVA' 카테고리의 다른 글
[JAVA] 스프링(Spring) 페이징 처리 클래스 PagedListHolder (2) | 2015.06.23 |
---|---|
JAVA 브라우저 확인 (0) | 2015.06.12 |
[JAVA]DispatchAction (0) | 2012.12.24 |
[JAVA]jdk 환경변수 설정 (0) | 2012.10.31 |
[JAVA]jdk 설치 (0) | 2012.10.31 |