java - multiple http requests at same time
<p>Is there a better way to send thousands of http GET requests at the same time? My code sends requests one after other. Have looked at other answers but could not figure it out. Thanks.            </p>

<pre><code>            for (int j=0; j&lt;4; j++)
        {

        DefaultHttpClient httpclient = new DefaultHttpClient();
        CookieStore cookieStore = httpclient.getCookieStore();
        HttpGet httpget = new HttpGet("");
        try {
            HttpResponse response = httpclient.execute(httpget);
            List&lt;Cookie&gt; cookies = cookieStore.getCookies();
        } catch (Exception e) {}

        httpclient.getConnectionManager().shutdown();
        }
</code></pre>
