public static String getSessionId(URLConnection con) {
        StringBuffer s = new StringBuffer();
        for (String data : con.getHeaderFields().get("Set-Cookie")) {
            if (!StringUtil.isBlank(s.toString()))
                s.append(",");
            s.append(data);
        }
        return s.toString();
    }