这是他自己写的函数。你看一下他引用了哪些class,然后去找函数的说明

解决方案 »

  1.   

    Cookie theCookie = null;
            Cookie cookies[] = request.getCookies();
            if (cookies != null) {
              for(int i=0, n=cookies.length; i < n; i++) {
                theCookie = cookies[i];
                if (theCookie.getName().equals("cart_id")) {
                  try {
                    cart_id.setAttribute("name",theCookie.getValue());
                  } catch (NumberFormatException ignored) {
                  }
                     break;
                  }
                }
              }