• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to upload to server

 
chetan dhumane
Ranch Hand
Posts: 641
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

How to Upload file to apache tomcat using HttpClient class(Or any other way).
I dont want to write to a file but i want to copy image to tomcat directory(Uploading).
Can anyone have a code ?
 
Rob Spoor
Sheriff
Posts: 20822
68
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You already found HttpClient, so you shouldn't have much trouble finding Apache Commons FileUpload. You will need to integrate that on the web server side.
 
chetan dhumane
Ranch Hand
Posts: 641
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have found that class but i dont know functionality for the same.I want it to integrate in android application.
I want to upload images to tomcat directory.

Do you have any helpful link ?
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The FileUpload page of the JavaRanch FAQ points to some material regarding the HttpClient and FileUpload libraries, and their respective web sites and documentation have more examples.

I think the Android API has a version of the HttpClient library built in, though, so you may not have to add that yourself.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!