code: public static void setCookieValue(CmsJspActionElement jsp, String name, String value) {
  
          Cookie[] cookies = jsp.getRequest().getCookies();
          for (int i = 0; (cookies != null) && (i < cookies.length); i++) {
              if (name.equalsIgnoreCase(cookies[i].getName())) {
                  cookies[i].setValue(value);
                  return;
              }
          }
          Cookie cookie = new Cookie(name, value);
          jsp.getResponse().addCookie(cookie);
      }
docs: Sets the value of a specific cookie.<p>
  If no cookie exists with the value, a new cookie will be created.
  
  @param jsp the CmsJspActionElement to use
  @param name the name of the cookie
  @param value the value of the cookie