Results 1 to 5 of 5
  1. #1
    jdetloff is offline Member
    Join Date
    Jan 2010
    Posts
    5
    Rep Power
    0

    Default Using HttpClient

    I recently was told that I should be using HttpClient to solve a problem I was working on, but I'm having a heck of a time downloading it appropriately and placing the files in the right place to make the sample code compile :confused:

    If anyone could be so kind as to check out the download page and assure me that I'm downloading the right file, I'd appreciate it greatly.

    hc dot apache dot org/downloads dot cgi

    Also, the page mentions this: "verify the integrity of the downloaded files using signatures downloaded from our main distribution directories" and this: "The KEYS link links to the code signing keys used to sign the product. The PGP link downloads the OpenPGP compatible signature from our main site. The MD5 link downloads the checksum from the main site."

    I have to admit I don't understand what either mean. I "right click save as" the zip file under binary with dependencies, and then "add external jars" from a new project in eclipse. Then I try to run a class with the sample code from the website above and get the following error:

    Exception in thread "main" java.lang.Error: Unresolved compilation problems:
    HttpClient cannot be resolved to a type
    HttpClient cannot be resolved to a type
    GetMethod cannot be resolved to a type
    GetMethod cannot be resolved to a type
    HttpMethodParams cannot be resolved
    DefaultHttpMethodRetryHandler cannot be resolved to a type
    HttpStatus cannot be resolved
    HttpException cannot be resolved to a type

    at Test.main(Test.java:14)

    If someone smarter than I could take a look at this download/import process and explain where I'm going wrong I'd greatly appreciate it.

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,967
    Rep Power
    19

    Default

    I take it you unzipped the download?

  3. #3
    r035198x is offline Senior Member
    Join Date
    Aug 2009
    Posts
    2,388
    Rep Power
    8

    Default

    Quote Originally Posted by Tolls View Post
    I take it you unzipped the download?
    You may be thrilled to know that they have another thread going for the same problem.

  4. #4
    jdetloff is offline Member
    Join Date
    Jan 2010
    Posts
    5
    Rep Power
    0

    Default

    I unzipped the .zip file, then added the .jar files as external jars to my eclipse project.

  5. #5
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,967
    Rep Power
    19

    Default

    Quote Originally Posted by r035198x View Post
    You may be thrilled to know that they have another thread going for the same problem.
    Oh right.
    Where?

Similar Threads

  1. Using HttpClient with Eclipse
    By jdetloff in forum Eclipse
    Replies: 4
    Last Post: 01-06-2010, 09:47 AM
  2. Getting httpclient working with eclipse.
    By int80 in forum Eclipse
    Replies: 4
    Last Post: 03-31-2009, 01:17 PM
  3. HttpClient invalid headers
    By Nicole in forum Advanced Java
    Replies: 6
    Last Post: 03-31-2009, 12:36 AM
  4. Replies: 1
    Last Post: 03-13-2009, 09:10 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •