标签:
private void addCookie(HttpServletResponse response ,String username,String password)
{
Cookie name = new Cookie("userName", username);
Cookie pwd = new Cookie("password", password);
//cookie存在7天
name.setMaxAge(7*24*60*60);
pwd.setMaxAge(7*24*60*60);
response.addCookie(name);
response.addCookie(pwd);
}
标签:
原文地址:http://www.cnblogs.com/dobestself-994395/p/4294448.html