Yong Hu wrote:
> How can I to make a connection to the server and retrieve the file if the
> file I am trying to open is not in the same machine ?
>
Alternative 1 -- arrange for a network mount of the disk containing the file
(NFS under Unix systems, Shared drives under Windows). Now, the file looks
like it is local, even though it is not, and you can use the File family of
classes to read it.
Alternative 2 -- use a URLConnection object to read it from a web server on
the machine containing the file. For instructions and sample code, see the
Networking Trail of the Java Language Tutorial
(http://java.sun.com/docs/books/tutorial).
Craig McClanahan
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html