Commons. What is the relationship between httpclient-3.X.jar and httpclient-4.x.jar?

Source: Internet
Author: User

I recently looked at the project code and saw two jar packages in the project, one of which is commons. httpclient-3.1.jar, one is httpclient4.2.1.jar, very puzzled, and the two packages have HttpClient class, but the package name is not the same, and then find some information, check the relationship between the two packages.

The dependency in the pom file of httpclient4.2.1.jar is as follows:

650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/14105225C-0.jpg "title =" QQ20131007151052.jpg "alt =" 151130996.jpg"/>

The jar package depends on three jar packages: httpcore, commons-logging, and commons-codec. While in the use of the commons-httpclient.jar package, the need to rely on commons-logging.jar and commons-codec.jar, The httpclient4.2.1.jar is equivalent to a collection of the previous commons-httpclient, commons-logging, commons-codec, these three jar packages reduce the tedious process of importing jar packages. Now you only need to import one httpclient. jar can be used.

When downloading the httpclient jar package on the apache official website, you will find that it is under an HttpComponent Project, which is a top-level project of apache. The three packages of the previous commons are under the commons project. On the HttpComponent webpage, you can see the following text: HttpComponents Client is a successor of and replacement for Commons HttpClient 3. x. Users of Commons HttpClient are strongly encouraged to upgrade.

That is to say, the commons-httpclient under commons is not updated and maintained. Users who use commons-httpclient also suggest updating it to the httpclient package.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.