{"id":2763,"date":"2009-03-17T03:28:13","date_gmt":"2009-03-17T03:28:13","guid":{"rendered":"http:\/\/www.happyfam.or.kr\/ysoh\/%ec%bf%a0%ed%82%a4-2\/"},"modified":"2015-02-10T21:12:17","modified_gmt":"2015-02-10T12:12:17","slug":"%ec%bf%a0%ed%82%a4-2","status":"publish","type":"post","link":"https:\/\/www.happyfam.or.kr\/ysoh\/%ec%bf%a0%ed%82%a4-2\/","title":{"rendered":"\ucfe0\ud0a4"},"content":{"rendered":"<p>\uc55e\uc11c \uc5ec\ud589\uc0ac\ub97c \ud1b5\ud55c \ud56d\uacf5\ud3b8 \uc608\uc57d\uc5d0\uc11c \uc124\uba85\ud55c \ubc14\uc640 \uac19\uc774 \ucfe0\ud0a4(Cookie)\ub294 \uc9c0\uc18d\uc801\uc73c\ub85c \ud544\uc694\ud55c \uc0ac\uc6a9\uc790\uc758 \uc815\ubcf4\ub97c \uc800\uc7a5\ud558\uae30\uc704\ud574 \uc0ac\uc6a9\ub418\ub294 \uae30\uc220\ub85c \ub2e4\uc74c\uacfc \uac19\uc740 \ud2b9\uc9d5\uc73c\ub85c \uc124\uba85\ud560 \uc218 \uc788\ub2e4.<\/p>\n<p>&nbsp; &nbsp; \uc6f9\ud504\ub85c\uadf8\ub7a8\uc758 \uc2e4\ud589\uc5d0 \ud544\uc694\ud55c \uc815\ubcf4\ub85c \ud074\ub77c\uc774\uc5b8\ud2b8-\uc11c\ubc84 \uc0ac\uc774\uc5d0\uc11c \uc9c0\uc18d\uc801\uc73c\ub85c \uad00\ub9ac\uac00 \ud544\uc694\ud55c \uc815\ubcf4<br \/>&nbsp; &nbsp; \uc11c\ubc84\uc758 \ud544\uc694\uc5d0 \uc758\ud574 \uc11c\ubc84\uac00 \uc8fc\uccb4\uac00 \ub418\uc5b4 \uc9c0\uc815\ub418\ub294 \uc815\ubcf4<br \/>&nbsp; &nbsp;<br \/>\n\ud074\ub77c\uc774\uc5b8\ud2b8(\ube0c\ub77c\uc6b0\uc800)\uc5d0\uc11c \ubcf4\uad00\ub418\uace0 http \uc811\uc18d \uc2dc \uc790\ub3d9\uc73c\ub85c \uc11c\ubc84\ub85c \ubcf4\ub0b4\uc9c0\ub294 \uc791\uc740 \uc6a9\ub7c9\uc758 \uc815\ubcf4<\/p>\n<p>JSP\uc5d0\uc11c \ucfe0\ud0a4\ub294 Cookie \ud074\ub798\uc2a4 \ubc0f request \uac1d\uccb4\uc640 response \uac1d\uccb4\uc5d0 \uc758\ud574 \ub9cc\ub4e4\uc5b4\uc9c0\uace0 \uc774\uc6a9\ub41c\ub2e4. \ub2e4\uc74c\uc740 request \uac1d\uccb4\uc640 response \uac1d\uccb4\uc5d0\uc11c \ucfe0\ud0a4\uc640 \uad00\ub828\ub41c \ud074\ub798\uc2a4 \ubc0f \uba54\uc18c\ub4dc\ub97c \uc815\ub9ac\ud55c \uac83\uc774\ub2e4.<\/p>\n<table border=\"1\" cellpadding=\"0\" cellspacing=\"0\" width=\"590\">\n<tbody>\n<tr>\n<td width=\"220\">\n<p>&nbsp;Method<\/p>\n<\/td>\n<td>\n<p>&nbsp;\uc124&nbsp; &nbsp;\uba85<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>&nbsp;Cookie(String<br \/>\n  name, String value)<\/p>\n<\/td>\n<td>\n<p>&nbsp;\uc774\ub984\uacfc \uac12\uc744 \uac00\uc9c0\uace0 \ucfe0\ud0a4 \uac1d\uccb4\ub97c \uc0dd\uc131\ud55c\ub2e4<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>&nbsp;setValue(String value)<\/p>\n<\/td>\n<td>\n<p>&nbsp;\ucfe0\ud0a4\uc758 \uac12\uc744 \uc124\uc815\ud55c\ub2e4<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>&nbsp;setMaxAge(int expiry)<\/p>\n<\/td>\n<td>\n<p>&nbsp;\ucfe0\ud0a4\uc758 \uc720\ud6a8\uc2dc\uac04\uc744 \uc124\uc815\ud55c\ub2e4.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>&nbsp;setPath(String dir)<\/p>\n<\/td>\n<td>\n<p>&nbsp;\ucfe0\ud0a4\ub97c \uc804\uc1a1\ud560 \uacbd\ub85c\ub97c \uc124\uc815\ud55c\ub2e4.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>&nbsp;setDomain(String addr)<\/p>\n<\/td>\n<td>\n<p>&nbsp;\ucfe0\ud0a4\ub97c \uc804\uc1a1\ud560 \ub3c4\uba54\uc778\uc744<br \/>\n  \uc124\uc815\ud55c\ub2e4.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>&nbsp;getName()<\/p>\n<\/td>\n<td>\n<p>&nbsp;\ube0c\ub77c\uc6b0\uc800\uc5d0\uc11c \uc804\uc1a1\ub41c \ucfe0\ud0a4\uc758<br \/>\n  \uc774\ub984\uc744 \uc5bb\ub294\ub2e4.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>&nbsp;getValue()<\/p>\n<\/td>\n<td>\n<p>&nbsp;\ube0c\ub77c\uc6b0\uc800\uc5d0\uc11c \uc804\uc1a1\ub41c \ucfe0\ud0a4\uc758<br \/>\n  \uac12\uc744 \uc5bb\ub294\ub2e4.<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><\/p>\n<table border=\"1\" cellpadding=\"0\" cellspacing=\"0\" width=\"590\">\n<tbody>\n<tr>\n<td width=\"220\">\n<p>&nbsp;Method<\/p>\n<\/td>\n<td>\n<p>&nbsp;\uc124&nbsp; &nbsp;\uba85<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>&nbsp;response.addCookie(Cookie cookie)<\/p>\n<\/td>\n<td>\n<p>&nbsp;\uc0dd\uc131\ub41c \ucfe0\ud0a4\ub97c \ube0c\ub77c\uc6b0\uc800\uc5d0<br \/>\n  \uc804\uc1a1\ud574 \uc800\uc7a5\ud558\ub3c4\ub85d \ud55c\ub2e4.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>&nbsp;request.getCookies()<\/p>\n<\/td>\n<td>\n<p>&nbsp;\ube0c\ub77c\uc6b0\uc800\uc5d0\uc11c \uc804\uc1a1\ub41c \ucfe0\ud0a4<br \/>\n  \uc815\ubcf4\ub97c \uc774\uc6a9 \ucfe0\ud0a4\uac1d\uccb4\ub97c \uc0dd\uc131\ud55c\ub2e4.<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\ucfe0\ud0a4 \uc124\uc815<\/p>\n<p>\ucfe0\ud0a4\ub294 \uc11c\ubc84\uc5d0 \uc758\ud574 \uc124\uc815\ub41c\ub2e4. \ucfe0\ud0a4\ub294 Cookie \ud074\ub798\uc2a4\uc5d0 \uc758\ud574 \uc0dd\uc131\ub418\uace0 \uc0dd\uc131\ub41c \ucfe0\ud0a4 \uac1d\uccb4\ub294 response \uac1d\uccb4\uc758 addCookie \uba54\uc18c\ub4dc\uc5d0 \uc758\ud574 \ud074\ub77c\uc774\uc5b8\ud2b8(\ube0c\ub77c\uc6b0\uc800)\uc5d0 \uc804\uc1a1\ub418\uace0 \uc804\uc1a1\ub41c \ucfe0\ud0a4\uac1d\uccb4\uc758 \uc815\ubcf4\ub294 \ud074\ub77c\uc774\uc5b8\ud2b8\uc5d0 \uc800\uc7a5\ub418\uc5b4 \ud574\ub2f9 \uc11c\ubc84\uc5d0 http \uc811\uc18d \uc2dc \uc790\ub3d9\uc73c\ub85c \ucfe0\ud0a4 \uc815\ubcf4\uac00 \uc11c\ubc84\ub85c \uc804\ub2ec\ub41c\ub2e4.<\/p>\n<p>\ud615\uc2dd<\/p>\n<p>Cookie <span style=\"font-style: italic\">cookie<\/span> = new Cookie(<span style=\"font-style: italic\">cookie_name<\/span>, <span style=\"font-style: italic\">cookie_value<\/span>);<br \/>response.addCookie(<span style=\"font-style: italic\">cookie<\/span>);<\/p>\n<p>\uc704 \ud615\uc2dd\uc5d0\uc11c \ucfe0\ud0a4\uac1d\uccb4\ub294 Cookie \ud074\ub798\uc2a4\uc758 \uc0dd\uc131\uc790 Cookie\uc5d0 \uc758\ud574 \uc0dd\uc131\ub41c\ub2e4. \uc774 \ub54c \ud544\uc694\ud55c \ud30c\ub77c\uba54\ud130\ub85c \ucfe0\ud0a4\uc774\ub984(cookie_name)\uacfc \ucfe0\ud0a4\uac12(cookie_value)\uc774 \uc694\uad6c\ub41c\ub2e4. \ub450 \ud30c\ub77c\uba54\ud130 \ubaa8\ub450 \ud074\ub798\uc2a4 String \ud615\uc2dd\uc774\ub2e4. \uc0dd\uc131\ub41c \ucfe0\ud0a4 \ucfe0\ud0a4\uc774\ub984\uacfc \ucfe0\ud0a4\uac12\uc758 \uc30d\uc744 \uc774\ub8e8\uba70 response.addCookie \uba54\uc18c\ub4dc\uc5d0 \uc758\ud574 \ud074\ub77c\uc774\uc5b8\ud2b8\ub85c \uc804\ub2ec\ud574\uc57c \ud55c\ub2e4. \uc774\ub807\uac8c \ud568\uc73c\ub85c\uc368 \ub2e4\uc74c \uc811\uc18d\ubd80\ud130 \ud074\ub77c\uc774\uc5b8\ud2b8\ub85c\ubd80\ud130 \ucfe0\ud0a4 \uc815\ubcf4\ub97c \ubc1b\uc744 \uc218 \uc788\ub2e4. \ub2e4\uc74c \ud504\ub85c\uadf8\ub7a8 &#8220;addCookie.jsp&#8221;\ub294 \ucfe0\ud0a4\ub97c \uc124\uc815\ud558\ub294 \uc608\ub97c \ubcf4\uc5ec\uc8fc\uace0 \uc788\ub2e4.<\/p>\n<div>&lt;%@ page language=&#8221;java&#8221; contentType=&#8221;text\/html; charset=EUC-KR&#8221;<br \/>&nbsp; &nbsp; pageEncoding=&#8221;EUC-KR&#8221;%&gt;<br \/>&lt;%@page import = &#8220;java.util.Date&#8221;%&gt;<br \/>&lt;!DOCTYPE html PUBLIC &#8220;-\/\/W3C\/\/DTD HTML 4.01 Transitional\/\/EN&#8221; <br \/>&#8220;http:\/\/www.w3.org\/TR\/html4\/loose.dtd&#8221;&gt;<br \/>&lt;html&gt;<br \/>&lt;head&gt;<br \/>&lt;meta http-equiv=&#8221;Content-Type&#8221; content=&#8221;text\/html; charset=EUC-KR&#8221;&gt;<br \/>&lt;title&gt;Insert title here&lt;\/title&gt;<br \/>&lt;\/head&gt;<br \/>&lt;body&gt;<br \/>&lt;%<br \/>&nbsp; &nbsp; String name = &#8220;time&#8221;;<br \/>&nbsp; &nbsp; Date date = new Date();<br \/>&nbsp; &nbsp; String value = date.toString();<\/p>\n<p>&nbsp; &nbsp; <span style=\"font-weight: bold\">Cookie cookie = new Cookie(name, value);<\/span> <br \/>&nbsp; &nbsp; <span style=\"font-weight: bold\">response.addCookie(cookie);<\/span><br \/>%&gt;<br \/>\ucfe0\ud0a4 \uc124\uc815\uc744 \ud588\uc2b5\ub2c8\ub2e4.<br \/>&lt;\/body&gt;<br \/>&lt;\/html&gt;<\/div>\n<p><div style=\"width: 451px\" class=\"wp-caption aligncenter\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.happyfam.or.kr\/ysoh\/wp-content\/uploads\/sites\/3\/1\/cfile8.uf.1654190F4A9A0E51024A59.png?resize=441%2C187\" width=\"441\" height=\"187\" alt=\"\uc0ac\uc6a9\uc790 \uc0bd\uc785 \uc774\ubbf8\uc9c0\" \/><p class=\"wp-caption-text\">addCookie.jsp \uc2e4\ud589\uacb0\uacfc<\/p><\/div><br \/>\uc704 \ud504\ub85c\uadf8\ub7a8\uc5d0\uc11c String \uce91\uccb4 name\uacfc Date \uac1d\uccb4 date\uc5d0 \uac01\uac01 &#8220;time&#8221;\uacfc Date \uac1d\uccb4\uac00 \uc0dd\uc131\ub41c \ub2f9\uc2dc\uc758 \ub0a0\uc9dc\uc640 \uc2dc\uac01\uc774 \uc800\uc7a5\ub418\uc5b4 \uc788\ub2e4. \uadf8\ub9ac\uace0 String \uac1d\uccb4 value\uc5d0 date \uac1d\uccb4\uc758 \ub0a0\uc9dc\uc640 \uc2dc\uac01\uc744 String \ud615\uc73c\ub85c \ubcc0\ud658\ud558\uc5ec \uc800\uc7a5\ud558\uace0 \uc788\ub2e4. \uadf8\ub7f0 \ub2e4\uc74c Cokkie \uac1d\uccb4 cookie\ub97c \ucfe0\ud0a4\uc774\ub984\uacfc \ucfe0\ud0a4\uac12\uc758 \uc30d\uc73c\ub85c \uc0dd\uc131\ud558\uace0 \uc0dd\uc131\ub41c Cookie \uac1d\uccb4 cookie\ub97c response \uac1d\uccb4\uc758 addCookie \uba54\uc18c\ub4dc\ub97c \uc774\uc6a9 \ud074\ub77c\uc774\uc5b8\ud2b8\uc5d0 \uc804\ub2ec \uc800\uc7a5\ud558\ub3c4\ub85d \ud558\uace0 \uc788\ub2e4. \ucc38\uace0\ub85c \ud504\ub85c\uadf8\ub7a8\uc5d0\uc11c \uc0ac\uc6a9\ub41c value \uac1d\uccb4\ub294 Cookie \uc0dd\uc131 \uc2dc \ud544\uc694\ud55c \ub450 \uac1c\uc758 \ud30c\ub77c\uba54\ud130(\ucfe0\ud0a4\uc774\ub984, \ucfe0\ud0a4\uac12)\uac00 \ubaa8\ub450 String \ud615\uc2dd\uc774\ubbc0\ub85c date \uac1d\uccb4\ub97c \uc9c1\uc811 \ub450 \ubc88\uc9f8 \ud30c\ub77c\uba54\ud130\ub85c \uc9c0\uc815\ud560 \uc218 \uc5c6\uae30 \ub54c\ubb38\uc774\ub2e4.<\/p>\n<p>\ucfe0\ud0a4 \uc77d\uae30<\/p>\n<p>\uc9c0\uc815\ub41c \ucfe0\ud0a4\ub294 \uc11c\ubc84\ub85c \uc811\uc18d\ud560 \ub54c \ud074\ub77c\uc774\uc5b8\ud2b8\ub85c\ubd80\ud130 \uc790\ub3d9\uc73c\ub85c \uc804\ub2ec\ub41c\ub2e4\uace0 \ud588\ub2e4. \uadf8\ub7ec\uba74\uc774 \ucfe0\ud0a4\ub294 \uc5b4\ub5bb\uac8c\uc11c\ubc84\uc5d0\uc11c \ucc98\ub9ac\ud560\uae4c? \uc774\ub294Cookie\uac1d\uccb4\uc758 getCookies \uba54\uc18c\ub4dc\ub97c \uc774\uc6a9 \ucc98\ub9ac\ud560 \uc218 \uc788\ub2e4. \ub2e4\uc74c \ud504\ub85c\uadf8\ub7a8 &#8220;getCookies.jsp&#8221;\ub97c \uc0b4\ud3b4\ubcf4\uc790<\/p>\n<div>&lt;%@ page language=&#8221;java&#8221; contentType=&#8221;text\/html; charset=EUC-KR&#8221;<br \/>&nbsp; &nbsp; pageEncoding=&#8221;EUC-KR&#8221;%&gt;<br \/>&lt;!DOCTYPE html PUBLIC &#8220;-\/\/W3C\/\/DTD HTML 4.01 Transitional\/\/EN&#8221; <br \/>&#8220;http:\/\/www.w3.org\/TR\/html4\/loose.dtd&#8221;&gt;<br \/>&lt;html&gt;<br \/>&lt;head&gt;<br \/>&lt;meta http-equiv=&#8221;Content-Type&#8221; content=&#8221;text\/html; charset=EUC-KR&#8221;&gt;<br \/>&lt;title&gt;Insert title here&lt;\/title&gt;<br \/>&lt;\/head&gt;<br \/>&lt;body&gt;<br \/>&lt;table border=&#8221;1&#8243;&gt;<br \/>&lt;tr&gt;<br \/>&lt;td&gt;\ucfe0\ud0a4\uc774\ub984&lt;\/td&gt;<br \/>&lt;td&gt;\ucfe0\ud0a4\uac12&lt;\/td&gt;<br \/>&lt;%<br \/>&nbsp; &nbsp; <span style=\"font-weight: bold\">Cookie [] cookie = request.getCookies();<\/span><br \/>&nbsp; &nbsp; <br \/>&nbsp; &nbsp; for(int i = 0; i &lt; cookie.length; i++)<br \/>&nbsp; &nbsp; {<br \/>%&gt;<br \/>&nbsp; &nbsp; &lt;tr&gt;<br \/>&nbsp; &nbsp; &lt;td&gt;&lt;%= <span style=\"font-weight: bold\">cookie[i].getName()<\/span> %&gt;&lt;\/td&gt;<br \/>&nbsp; &nbsp; &lt;td&gt;&lt;%= <span style=\"font-weight: bold\">cookie[i].getValue()<\/span> %&gt;&lt;\/td&gt;<br \/>&nbsp; &nbsp; &lt;\/tr&gt;<br \/>&lt;%<br \/>&nbsp; &nbsp; }<br \/>%&gt;<br \/>&lt;\/table&gt;<br \/>&lt;\/body&gt;<br \/>&lt;\/html&gt;<\/div>\n<p><div style=\"width: 451px\" class=\"wp-caption aligncenter\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.happyfam.or.kr\/ysoh\/wp-content\/uploads\/sites\/3\/1\/cfile10.uf.14209D0D4A9A0E52096B48.png?resize=441%2C187\" width=\"441\" height=\"187\" alt=\"\uc0ac\uc6a9\uc790 \uc0bd\uc785 \uc774\ubbf8\uc9c0\" \/><p class=\"wp-caption-text\">getCookies.jsp \uc2e4\ud589\uacb0\uacfc<\/p><\/div><br \/>\uc704 \ud504\ub85c\uadf8\ub7a8\uc5d0\uc11c request.getCookies()\ub294 \ud074\ub77c\uc774\uc5b8\ud2b8\ub85c\ubd80\ud130 \uc11c\ubc84\ub85c \uc804\ub2ec\ub41c \ucfe0\ud0a4\uc774\ub984\uacfc \ucfe0\ud0a4\uac12\uc758 \uc30d\uc73c\ub85c \uc774\ub8e8\uc5b4\uc9c4 \ubaa8\ub4e0 \ucfe0\ud0a4\uc815\ubcf4\ub97c \uc77d\ub294\ub2e4. \uadf8\ub7ec\ubbc0\ub85c \uc77d\uc5b4\uc628 \ucfe0\ud0a4\uc815\ubcf4\ub97c \ud504\ub85c\uadf8\ub7a8\uc5d0\uc11c \uc774\uc6a9\ud558\ub824\uba74 Cookie \ud074\ub798\uc2a4\uc5d0 \uc758\ud574 \uc0dd\uc131\ub41c \uac1d\uccb4\uc5d0 \uc800\uc7a5\ud574\uc57c \ud55c\ub2e4. \uc704 \ud504\ub85c\uadf8\ub7a8\uc5d0\uc11c\ub294 \ud074\ub77c\uc774\uc5b8\ud2b8\ub85c\ubd80\ud130 \uc804\ub2ec\ub41c \ubaa8\ub4e0 \ucfe0\ud0a4 \uc815\ubcf4\ub97c \uc800\uc7a5\ud558\uae30 \uc704\ud574 Cookie \ubc30\uc5f4\uc744 \uc774\uc6a9\ud574 \uc800\uc7a5\ud558\uace0 \uc788\ub2e4. \ucfe0\ud0a4\uc815\ubcf4\ub294 \uc774\ub984\uacfc \uac12\uc758 \uc30d\uc744 \uc774\ub8e8\uace0 \uc788\ub2e4\uace0 \ud588\uc73c\ubbc0\ub85c \uac01 \uc815\ubcf4\ub294 getName() \uba54\uc18c\ub4dc\uc640 getValue \uba54\uc18c\ub4dc\ub97c \uc774\uc6a9\ud558\uba74 \uc5bb\uc744 \uc218 \uc788\uc73c\uba70, \uc704 \ud504\ub85c\uadf8\ub7a8\uc5d0\uc11c\ub294 \uc774 \ub450 \uba54\uc18c\ub4dc\ub97c \uc774\uc6a9 \uadf8 \uac12\uc744 \ucd9c\ub825\ud558\uace0 \uc788\ub2e4.<\/p>\n<p>\uadf8\ub7ec\ub098 \uc704 \ud504\ub85c\uadf8\ub7a8\uc744 \uc2e4\ud589\ud588\uc744 \ub54c \ub2e4\uc74c\uacfc \uac19\uc774 \uc624\ub958\uac00 \ubc1c\uc0dd\ud560 \uc218 \uc788\ub2e4.<\/p>\n<p><div style=\"width: 451px\" class=\"wp-caption aligncenter\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.happyfam.or.kr\/ysoh\/wp-content\/uploads\/sites\/3\/1\/cfile4.uf.1810180C4A9A0E52B72C7F.png?resize=441%2C408\" width=\"441\" height=\"408\" alt=\"\uc0ac\uc6a9\uc790 \uc0bd\uc785 \uc774\ubbf8\uc9c0\" \/><p class=\"wp-caption-text\">getCookies.jsp \uc2e4\ud589\uc624\ub958<\/p><\/div><br \/>\uc774\ub7f0 \uc624\ub958\uac00 \ubc1c\uc0dd\ud558\ub294 \uc774\uc720\ub294 \ud074\ub77c\uc774\uc5b8\ud2b8\uc5d0\uc11c \uc11c\ubc84\ub85c \uc804\ub2ec\ub41c \ucfe0\ud0a4\uac00 \uc5c6\uae30 \ub54c\ubb38\uc73c\ub85c \ube0c\ub77c\uc6b0\uc800\ub97c \ub744\uc6b0\uace0 \ucc98\uc74c\uc73c\ub85c \uc2e4\ud589\ud55c \ud504\ub85c\uadf8\ub7a8\uc774 &#8220;getCookies.jsp&#8221; \uc77c \ub54c \ubc1c\uc0dd\ud55c\ub2e4. \ub530\ub77c\uc11c \ud074\ub77c\uc774\uc5b8\ud2b8\uc5d0\uc11c \uc804\ub2ec\ub41c \ucfe0\ud0a4\ub97c \uc77d\uae30\uc704\ud55c \uba54\uc18c\ub4dc getCookies\ub294 \ubc18\ub4dc\uc2dc \uc774 \uba54\uc18c\ub4dc\uac00 \uc2e4\ud589\ub418\uae30 \uc804\uc5d0 \ucfe0\ud0a4\uac00 \uc9c0\uc815\ub418\uc5b4 \uc788\uc5b4\uc57c \ud55c\ub2e4.<\/p>\n<p>\ucfe0\ud0a4 \uc0ad\uc81c<\/p>\n<p>\ud074\ub77c\uc774\uc5b8\ud2b8\uc5d0 \uc800\uc7a5\ub41c \ucfe0\ud0a4\ub294 \uae30\ubcf8\uc801\uc73c\ub85c \ube0c\ub77c\uc6b0\uc800\uac00 \uc11c\ubc84\ub85c\ubd80\ud130 \ucfe0\ud0a4 \uc815\ubcf4\ub97c \ubc1b\uc740 \ud6c4\uc5d0 \ube0c\ub77c\uc6b0\uc800\uac00 \uc885\ub8cc\ub418\uae30 \uc804\uae4c\uc9c0 \uc800\uc7a5\ub418\uc5b4 \uc788\ub2e4\uac00 \ube0c\ub77c\uc6b0\uc800\uac00 \uc885\ub8cc\ub418\uba74 \uc0ad\uc81c\ub41c\ub2e4. \uadf8\ub7ec\ub098 \ube0c\ub77c\uc6b0\uc800\uac00 \uc885\ub8cc\ub418\uae30 \uc804 \ud544\uc694\uc5d0 \uc758\ud574 \uc0ad\uc81c\ud558\ub824\uba74 \uc5b4\ub5bb\uac8c \ud560\uae4c? \uc774\uac83\uc740 Cookie \ud074\ub798\uc2a4\uc758&nbsp; setMaxAge \uba54\uc18c\ub4dc\ub97c \uc774\uc6a9 \ud06c\ub77c\uc774\uc5b8\ud2b8\uc5d0 \uc800\uc7a5\ub41c \ucfe0\ud0a4\ub97c \uc0ad\uc81c\ud560 \uc218 \uc788\ub2e4. setMaxAge \uba54\uc18c\ub4dc\ub294 \ucfe0\ud0a4\uc790 \uc720\uc9c0\ub418\ub294 \uc2dc\uac04\uc744 \uc9c0\uc815\ud558\ub294 \ud568\uc218\ub85c \uac12\uc744 0\uc73c\ub85c \uc124\uc815\ud558\uba74 \ucfe0\ud0a4\uac00 \uc0ad\uc81c\ub41c\ub2e4.<\/p>\n<p>\ub2e4\uc74c \ud504\ub85c\uadf8\ub7a8 &#8220;delCookies.jsp&#8221;\ub294 \ud074\ub77c\uc774\uc5b8\ud2b8\uc5d0 \uc800\uc7a5\ub41c \ubaa8\ub4e0 \ucfe0\ud0a4\ub97c \uc0ad\uc81c\ud558\ub294 \ud504\ub85c\uadf8\ub7a8\uc774\ub2e4.<\/p>\n<div>&lt;%@ page language=&#8221;java&#8221; contentType=&#8221;text\/html; charset=EUC-KR&#8221;<br \/>&nbsp; &nbsp; pageEncoding=&#8221;EUC-KR&#8221;%&gt;<br \/>&lt;!DOCTYPE html PUBLIC &#8220;-\/\/W3C\/\/DTD HTML 4.01 Transitional\/\/EN&#8221;<br \/>&#8220;http:\/\/www.w3.org\/TR\/html4\/loose.dtd&#8221;&gt;<br \/>&lt;html&gt;<br \/>&lt;head&gt;<br \/>&lt;meta http-equiv=&#8221;Content-Type&#8221; content=&#8221;text\/html; charset=EUC-KR&#8221;&gt;<br \/>&lt;title&gt;Insert title here&lt;\/title&gt;<br \/>&lt;\/head&gt;<br \/>&lt;body&gt;<br \/>&lt;%<br \/>Cookie [] cookie = request.getCookies();<br \/>for(int i = 0; i &lt; cookie.length; i ++) {<br \/>&nbsp; &nbsp; cookie[i].setMaxAge(0);<br \/>&nbsp; &nbsp; response.addCookie(cookie[i]);<br \/>}<br \/>%&gt;<br \/>\uc124\uc815\ub41c \ubaa8\ub4e0 \ucfe0\ud0a4\ub97c \uc0ad\uc81c\ud588\uc2b5\ub2c8\ub2e4.<br \/>&lt;\/body&gt;<br \/>&lt;\/html&gt;<\/div>\n<p><div style=\"width: 451px\" class=\"wp-caption aligncenter\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.happyfam.or.kr\/ysoh\/wp-content\/uploads\/sites\/3\/1\/cfile27.uf.1638D50E4A9A0E52BA0D10.png?resize=441%2C182\" width=\"441\" height=\"182\" alt=\"\uc0ac\uc6a9\uc790 \uc0bd\uc785 \uc774\ubbf8\uc9c0\" \/><p class=\"wp-caption-text\">delCookies.jsp \uc2e4\ud589\uacb0\uacfc<\/p><\/div><br \/>\uc704 \ud504\ub85c\uadf8\ub7a8\uc740 request.getCookies() \uba54\uc18c\ub4dc\ub97c \uc774\uc6a9 \ud074\ub77c\uc774\uc5b8\ud2b8\ub85c\ubd80\ud130 \uc804\ub2ec\ub41c \ubaa8\ub4e0 \ucfe0\ud0a4\ub97c \uc77d\uc740 \ud6c4 \uac01 \ucfe0\ud0a4\uc758 \uc9c0\uc18d\uc2dc\uac04\uc744 setMacAge(0)\uc5d0 \uc758\ud574 0\uc73c\ub85c \uc124\uc815\ud558\uace0 \ud074\ub77c\uc774\uc5b8\ud2b8\uc5d0 \ub2e4\uc2dc \uc9c0\uc815\ud568\uc73c\ub85c\uc368 \ud074\ub77c\uc774\uc5b8\ud2b8\uac00 \ucfe0\ud0a4\uc815\ubcf4\ub97c \uc0ad\uc81c\ud558\ub3c4\ub85d \ud558\uace0\uc788\ub2e4. &#8220;AddCookie.jsp&#8221;\uc640 &#8220;delCookies.jsp&#8221;\ub97c \ucc28\ub840\ub85c \uc2e4\ud589\ud55c \ud6c4 &#8220;getCookies.jsp&#8221;\ub97c \uc2e4\ud589\ud558\uba74 \ub2e4\uc74c\uacfc \uac19\uc740 \uacb0\uacfc\ub97c \uc5bb\ub294\ub2e4.<\/p>\n<p><div style=\"width: 451px\" class=\"wp-caption aligncenter\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.happyfam.or.kr\/ysoh\/wp-content\/uploads\/sites\/3\/1\/cfile28.uf.1622DF0D4A9A0E53054CCD.png?resize=441%2C187\" width=\"441\" height=\"187\" alt=\"\uc0ac\uc6a9\uc790 \uc0bd\uc785 \uc774\ubbf8\uc9c0\" \/><p class=\"wp-caption-text\">delCookie.jsp \uc2e4\ud589 \ud6c4 getCookies.jsp \uacb0\uacfc<\/p><\/div><br \/>\uc704 \uacb0\uacfc\uc5d0\uc11c \uc0b4\ud3b4\ubcf4\uba74 &#8220;addCookie.jsp&#8221;\uc5d0\uc11c \uc124\uc815\ub41c &#8220;\ucfe0\ud0a4\uc774\ub984\/\ucfe0\ud0a4\uac12&#8221;\uc758 \uc30d\uc778 &#8220;time&#8221;\/&#8221;\uc124\uc815\uc2dc\uac01&#8221;\uc740 &#8220;del.Cookies.jsp&#8221;\uc5d0 \uc758\ud574 \uc0ad\uc81c\ub418\uc5c8\uc74c\uc744 \ud655\uc778\ud560 \uc218 \uc788\ub2e4. \uadf8\ub7ec\ub098 \ucfe0\ud0a4\uc774\ub984\uc774 &#8220;JSESSIONID&#8221;\uacfc \uad00\ub828\ub41c \ud56d\ubaa9\uc740 \ub4a4\uc5d0 \ubc30\uc6b8 \uc138\uc158\uacfc \uad00\ub828\ub41c \ucfe0\ud0a4 \uc815\ubcf4\ub85c Tomcat\uacfc \uac19\uc740 JSP \ucee8\ud14c\uc774\ub108\uc5d0 \uc790\ub3d9\uc73c\ub85c \uc0dd\uc131\ub418\ub294 \uc815\ubcf4\uc774\ubbc0\ub85c \uc0ad\uc81c\ub418\uc9c0 \uc54a\ub294\ub2e4.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\uc55e\uc11c \uc5ec\ud589\uc0ac\ub97c \ud1b5\ud55c \ud56d\uacf5\ud3b8 \uc608\uc57d\uc5d0\uc11c \uc124\uba85\ud55c \ubc14\uc640 \uac19\uc774 \ucfe0\ud0a4(Cookie)\ub294 \uc9c0\uc18d\uc801\uc73c\ub85c \ud544\uc694\ud55c \uc0ac\uc6a9\uc790\uc758 \uc815\ubcf4\ub97c \uc800\uc7a5\ud558\uae30\uc704\ud574 \uc0ac\uc6a9\ub418\ub294 \uae30\uc220\ub85c \ub2e4\uc74c\uacfc \uac19\uc740 \ud2b9\uc9d5\uc73c\ub85c \uc124\uba85\ud560 \uc218 \uc788\ub2e4. &nbsp; &nbsp; \uc6f9\ud504\ub85c\uadf8\ub7a8\uc758 \uc2e4\ud589\uc5d0 \ud544\uc694\ud55c \uc815\ubcf4\ub85c \ud074\ub77c\uc774\uc5b8\ud2b8-\uc11c\ubc84 \uc0ac\uc774\uc5d0\uc11c \uc9c0\uc18d\uc801\uc73c\ub85c \uad00\ub9ac\uac00 \ud544\uc694\ud55c \uc815\ubcf4&nbsp; &nbsp; \uc11c\ubc84\uc758 \ud544\uc694\uc5d0 \uc758\ud574 \uc11c\ubc84\uac00 \uc8fc\uccb4\uac00 \ub418\uc5b4 \uc9c0\uc815\ub418\ub294 \uc815\ubcf4&nbsp; &nbsp; \ud074\ub77c\uc774\uc5b8\ud2b8(\ube0c\ub77c\uc6b0\uc800)\uc5d0\uc11c \ubcf4\uad00\ub418\uace0 http \uc811\uc18d \uc2dc \uc790\ub3d9\uc73c\ub85c \uc11c\ubc84\ub85c \ubcf4\ub0b4\uc9c0\ub294 \uc791\uc740 \uc6a9\ub7c9\uc758 \uc815\ubcf4\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.happyfam.or.kr\/ysoh\/%ec%bf%a0%ed%82%a4-2\/\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":3,"featured_media":2764,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[244],"tags":[15,29,108],"class_list":["post-2763","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-jsp","tag-eclipse","tag-jsp","tag-108"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/www.happyfam.or.kr\/ysoh\/wp-content\/uploads\/sites\/3\/1\/cfile8.uf.1654190F4A9A0E51024A59.png?fit=441%2C187&ssl=1","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p776QY-Iz","jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/www.happyfam.or.kr\/ysoh\/wp-json\/wp\/v2\/posts\/2763","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.happyfam.or.kr\/ysoh\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.happyfam.or.kr\/ysoh\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.happyfam.or.kr\/ysoh\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.happyfam.or.kr\/ysoh\/wp-json\/wp\/v2\/comments?post=2763"}],"version-history":[{"count":0,"href":"https:\/\/www.happyfam.or.kr\/ysoh\/wp-json\/wp\/v2\/posts\/2763\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.happyfam.or.kr\/ysoh\/wp-json\/wp\/v2\/media\/2764"}],"wp:attachment":[{"href":"https:\/\/www.happyfam.or.kr\/ysoh\/wp-json\/wp\/v2\/media?parent=2763"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.happyfam.or.kr\/ysoh\/wp-json\/wp\/v2\/categories?post=2763"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.happyfam.or.kr\/ysoh\/wp-json\/wp\/v2\/tags?post=2763"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}