code: static boolean isHttpOnlyReflect(javax.servlet.http.Cookie servletCookie){
          try {
              return (Boolean)servletCookie.getClass().getMethod("isHttpOnly").invoke(servletCookie);
          } catch (Exception e) {
  //            Cookie.logger.warn("You are trying to get HttpOnly from a cookie, but it appears you are running on Servlet version before 3.0. Returning false.. which can be false!");
              return false; //return default. Should we be throwing exception here?
          }
      }
docs: Need to call this by reflection for backwards compatibility with Servlet 2.5