tl  tr
  Home | Tutorials | Articles | Videos | Products | Tools | Search
Interviews | Open Source | Tag Cloud | Follow Us | Bookmark | Contact   
 Tools and Libs > Jsoup > Get Connection

Get Connection 

Jsoup is an open source java library for parsing and manipulating HTML with ease. Get the latest binaries from http://jsoup.org/. This requires the library jsoup-1.6.1.jar to be in classpath. The following example shows getting the html content by making HTTP Get request.

File Name  :  
com/bethecoder/tutorials/jsoup/tests/GetConnectTest.java 
Author  :  Sudhakar KV
Email  :  [email protected]
   
package com.bethecoder.tutorials.jsoup.tests;

import java.io.IOException;

import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;

public class GetConnectTest {

  /**
   @param args
   @throws IOException 
   */
  public static void main(String[] argsthrows IOException {
    Document doc = Jsoup.connect(
        "http://bethecoder.com/applications/tutorials/csv-open-csv.html").get();
    System.out.println(doc.title());
  }

}
   

It gives the following output,
File Name  :  OUTPUT



 
  


  
bl  br