This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Java in General and the fly likes uploading a file programmatically Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "uploading a file programmatically" Watch "uploading a file programmatically" New topic

uploading a file programmatically

Gayatri Sinha
Ranch Hand

Joined: Feb 13, 2006
Posts: 34

we need to upload a file to a website regularly. This website has a login, password and then a button to browse the file and a upload button to upload the file.

Have been doing this manually till now, is it possible have a program that could upload the file to the website?

- Gayatri
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 41155
You could use HttpUnit (on SourceForge) to navigate through the login, and then use Jakarta Commons HttpClient to do the file upload.

Ping & DNS - my free Android networking tools app
Adam Richards
Ranch Hand

Joined: Nov 03, 2005
Posts: 135
Or, if the Web site has an FTP server running, use the Jakarta Commons FTP client class.
I agree. Here's the link:
subject: uploading a file programmatically
Similar Threads
sending xml file from server to client dynamically.
How to upload image to the server and store it into DB?
Name of the submission jar
File upload using selenium (selenium-java-2.15.0.jar) not working
Submitting the design file