?
Solved

A portablity problem

Posted on 1998-11-14
2
Medium Priority
?
146 Views
Last Modified: 2013-11-22
I have to write a servlet that copies a text file from a remote server to the local server. The remote server can be anything - Unix, NT.
How that can be done without using URLs or NFS? I think my problem is the naming convention.
0
Comment
Question by:Gadi031698
2 Comments
 

Author Comment

by:Gadi031698
ID: 1227459
Edited text of question
0
 
LVL 16

Accepted Solution

by:
heyhey_ earned 40 total points
ID: 1227460
i don't think your problem is the naming convention, but the protocol for transfer of remote data ...
the remote machine manages its own File System and if you want to get some files from there, you will need some kind of server program (working there) that can handle your file request and return the appropriate file(s)

there are many standard protocols for data exchange (FTP, HTTP, even POP3 ...) and the URL object in Java is just a wrapper of the appropriate protocol so if you create HTTP URL object and call getInputStream, the URL object will send the appropriate HTTP request message and will handle the HTTP response message, giving you the pure data. so does FTP URL object ...
(there is no magic at all)

if you are working on LAN with NFS you can probably use File object with appropriate name ...

hope this helps
  heyhey
(if you really don't want to use URL objects, you have to write your own server app. clients should connect to the server (using Sockets) ask for particular file; the server will send them the file and they can save it ...)
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

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

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
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 how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Suggested Courses
Course of the Month17 days, 8 hours left to enroll

831 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