?
Solved

Posting a file to a URL with HttpClient

Posted on 2007-03-20
4
Medium Priority
?
230 Views
Last Modified: 2010-03-31
I am looking for some sample Java code showing how to post (HTTP POST method) a file to a URL using the HttpClient library (link below). Anyone has anything like this?

http://jakarta.apache.org/commons/httpclient/

Alex
0
Comment
Question by:avernet
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 18760116
There are examples with the download
0
 
LVL 86

Accepted Solution

by:
CEHJ earned 500 total points
ID: 18760137
e.g.

<INSTALL DIR>/src/examples/PostXML.java
0
 
LVL 1

Author Comment

by:avernet
ID: 18765983
CEHJ,

Excellent; it works perfectly, thank you.

Alex
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 18766289
:-)
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
Suggested Courses
Course of the Month12 days, 15 hours left to enroll

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question