Cookie c=new Cookie("LastVisit",date.toLocaleString());
response.addCookie(c);
Date date = new Date();
DateFormat df = DateFormat.getDateTimeInstance();
Cookie c = new Cookie("LastVisit",df.format(date));
response.addCookie(c);
Date date = new Date();
SimpleDateFormat fm = new SimpleDateFormat("yyyy-MM-dd/HH:mm:ss");
Cookie c=new Cookie("LastVisit",fm.format(date));
response.addCookie(c);
欢迎光临 黑马程序员技术交流社区 (http://bbs.itheima.com/) | 黑马程序员IT技术论坛 X3.2 |