I'm stuck in a project where I have two dependencies that seem to be contradicting themselves.
One lib is apache's httpClient 4.1.* and the other is apache's HttpClient 4.3.*.
Is there a way to have HttpClient 4.3.* and keep it backwards compatible with 4.1.*?
According to the javadoc, the interface is deprecated, not removed.
When I try to use just the 4.3.2, I get:
java.lang.ClassNotFoundException: org.apache.http.protocol.HttpContext
I'm running on Tomcat 7.0.50 and I'm running on eclipse
In the end, this happened because of the IDE I am using (eclipse) even though I once tell that I want to use all dependencies on the server I have it associated with (in this case, tomcat 7.0), It didn't update when I had added this HttpClient 4.3.2.
Furthermore, the program was giving problems in one of the sub-systems that was requiring 4.1.* in a class that is classified as deprecated in 4.3.2.
It was just a series of coincidences (and misreading the manual or gap in the manual) that lead to my misinterpretation of what was really happening.
On eclipse , to add libraries from the project to make them available from the server, use this tool:
project -> properties -> deployment assembly
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.