code: public void sendCookie(String name, String value) {
          RequestContext.getHttpResponse().addCookie(Cookie.toServletCookie(new Cookie(name, value)));
      }
docs: Sends cookie to browse with response.
  
  @param name name of cookie
  @param value value of cookie.