Solved

Posting a file to a URL with HttpClient

Posted on 2007-03-20
4
196 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
  • 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 125 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

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…
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
The viewer will learn how to implement Singleton Design Pattern in Java.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

947 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now