public class Main {    public static void main(String[] args) throws Exception {
        // Create and initialize HTTP parameters
    
        HttpParams params = new BasicHttpParams();
        ConnManagerParams.setMaxTotalConnections(params, 100);
        HttpProtocolParams.setVersion(params, HttpVersion.HTTP_1_1);        
        SchemeRegistry schemeRegistry = new SchemeRegistry();
        schemeRegistry.register(
                new Scheme("http", PlainSocketFactory.getSocketFactory(), 80));        
        ClientConnectionManager cm = new ThreadSafeClientConnManager(params, schemeRegistry);
        HttpClient httpClient = new DefaultHttpClient(cm, params);        // create an array of URIs to perform GETs on
        String[] urisToGet = {
            "http://www.baidu.com", 
                "http://www.sohu.com"               
        };        // create a thread for each URI
        GetThread[] threads = new GetThread[urisToGet.length];
        
        try{
        
        for (int i = 0; i < threads.length; i++) {
            HttpGet httpget = new HttpGet(urisToGet[i]);
            threads[i] = new GetThread(httpClient, httpget, i + 1);
            
            
        }

        // start the threads
        for (int j = 0; j < threads.length; j++) {
            threads[j].start();
        }

        // join the threads
        for (int j = 0; j < threads.length; j++) {
            threads[j].join();
        }
        }finally {          
            httpClient.getConnectionManager().shutdown();   
        }      
    }    /**
     * A thread that performs a GET.
     */
    public static class GetThread extends Thread {        private final HttpClient httpClient;
        private final HttpContext context;
        private final HttpGet httpget;
        private final int id;        public GetThread(HttpClient httpClient, HttpGet httpget, int id) {
            this.httpClient = httpClient;
            this.context = new BasicHttpContext();
            this.httpget = httpget;
            this.id = id;
        }        /**
         * Executes the GetMethod and prints some status information.
         */
        @Override
        public void run() {            System.out.println(id + " - about to get something from " + httpget.getURI());            try {
                
                HttpResponse response = httpClient.execute(httpget, context);              
                
                System.out.println(id + ":" +response.getStatusLine());                
                
            } catch (Exception e) {
                httpget.abort();
                System.out.println(id + " - error: " + e);
            }
        }
    }
}怎么输出到页面上!!谢谢各位了!