添加 <% Cookie mycookie = new Cookie("aName","aValue"); cookie_name.setMaxAge( time_in_milisecs ); response.addCookie(mycookie); %> ======================================= 删除 <% Cookie killMyCookie = new Cookie("mycookie", null); killMyCookie.setMaxAge(0); killMyCookie.setPath("/"); response.addCookie(killMyCookie); %> |