public static void addCookie(HttpServletResponse response, String name,
            String value) {
        if (StringUtils.isNotEmpty(name) && StringUtils.isNotEmpty(value)) {
            Cookie cookie = new Cookie(name, value);
            // cookie.setDomain(OptConfig.DOMAIN);
            cookie.setPath("/");
            cookie.setMaxAge(7 * 24 * 60 * 60);
            response.addCookie(cookie);
        }
    }