public String getCookie(String name, String dfvalue) {
        for (HttpCookie c : getCookies()) {
            if (name.equals(c.getName())) return c.getValue();
        }
        return dfvalue;
    }
public String getCookie ( String name , String dfvalue ) { for ( HttpCookie c : getCookies ( ) ) { if ( name . equals ( c . getName ( ) ) ) return c . getValue ( ) ; } return dfvalue ; }
获取Cookie值， 没有返回默认值

@param name    cookie名
@param dfvalue 默认cookie值

@return cookie值