存过程
Cookie userstyleCookie = new Cookie("userstyle", stylepath);
userstyleCookie.setMaxAge(36000);
response.addCookie(userstyleCookie);
读取过程
String stylepath = "common";
Cookie[] cookieStyle = request.getCookies();
System.out.println(cookieStyle.length);
for(int i = 0; i<cookieStyle.length; i++){
Cookie cookie = cookieStyle[i];
if("userstyle".equals(cookie.getName())){
stylepath = cookie.getValue();
break;
}
}为什么读取不出cookie中的值