public String findContactByName(String name, String value, HttpServletRequest request, HttpServletResponse response) { ... Cookie cookie_username = new Cookie("cookie_username", name); // cookie_username.setMaxAge(30 * 24 * 60 * 60); cookie_username.setMaxAge(10 *24 * 60); cookie_username.setDomain("localhost"); ** cookie_username.setPath("/");//共享路径 response.addCookie(cookie_uid); } 之前 cookie为null 因为没有添加到response中,添加了 ** 处 就添加进去了
关于Cookie存放
最新推荐文章于 2023-05-07 23:00:19 发布