This is regarding a query to read a file in a remote server.
The user interface is a html screen which contains 2 fields: Server ip & file name. Both are drop down fields.So they can select only the given file names & server names.
A servlet will recieve the data from the html. The logic used is as below: A URL is created with input given and using URLCOnnection i get the inputstream and read the data in the file. But i get an error, "file not found." The url path formed looks like this http://serverip/filepath/filename.
The file i am checking is in the home directory in the unix server. Will the path given in the url check in the home directory. If not how to specify the path to the "home" directory in the url path.
A URL starting with "http" will only be understood by a web server. Are all the possible yservers you want to retrieve files from set up with a web server AND with a servlet/CGI that listens to URLs of the form you describe? It sounds like you are trying to use HTTP as a sort of distributed file system, but that will only work with web servers and proper web apps that listen for file requests and return those files. Is using the filesystem directly (with mounts for the various servers) out of the question? I would be very hesitant to serve files out of the root directory over HTTP for security reasons.