code: public static void addCookie(
              HttpServletRequest request,
              HttpServletResponse response,
              String name,
              String value,
              int maxAge) {
          addCookie(request, response, name, value, null, maxAge,false);
      }
docs: add a cookie