This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Hands On Software Engineering with Python and have Brian Allbey on-line!
See this thread for details.
Win a copy of Hands On Software Engineering with Python this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Liutauras Vilda
Sheriffs:
  • Tim Cooke
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Ron McLeod
  • Ganesh Patekar
  • salvin francis
Bartenders:
  • Tim Holloway
  • Carey Brown
  • Stephan van Hulst

Updating to Remote host  RSS feed

 
Ranch Hand
Posts: 62
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I am not new to java but never done socket programming before. I was reading about reading a file from remote host is possible with URL but couldn't find if it is possible for client to update the file back to the server(Remote host not the local host)?
Can anyone please make me understand this. And if not possible then why?  

Thanks in advance.
JJ
 
Rancher
Posts: 3353
33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What software is running on the remote host?  How is your PC connected to the remote host?
 
Jeena Jeen
Ranch Hand
Posts: 62
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Its connected through http. Remote host is just a web server supporting java and can accept Binary content.
 
Sheriff
Posts: 23965
50
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can certainly upload (not "update") a file to a web server, provided that the server provides a page which supports that. When you say it "can accept binary content" it sounds to me like there is a page which supports uploads.

You can write your own Java code for doing file uploads, but you have to learn a whole lot of boring details about the HTTP specifications. But it's really better to use Apache's HttpClient package -- you don't have to learn the boring specs and it works already.
 
If you settle for what they are giving you, you deserve what you get. Fight for this tiny ad!
Programmatically Create PDF Using Free Spire.PDF with Java
https://coderanch.com/wiki/703735/Programmatically-Create-PDF-Free-Spire
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!