Link to home
Start Free TrialLog in
Avatar of ist249
ist249

asked on

File Transfer Java Server Program and a sample client application that tests the server

I have to write a JAva Server application that uses a socket connection to allow a client to specify a file name and have the server send the contents of the file or indicate that the file does not exist.

Also the client should save the file to a local disk.
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

That's interesting for you
Avatar of ist249
ist249

ASKER

Able to connect client to server.
Please help me how to open search for the file and send it back to the client
Reading from a input stream and writing to an output stream always seems to work. :)
Jakarta's Commons project has an FTP Client built into it if you don't want to re-invent one.

http://jakarta.apache.org/commons/index.html

Of course you would have to find an FTP Server for your server.

ASKER CERTIFIED SOLUTION
Avatar of pronane
pronane

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
you wanna attach a footnote or a bibliography to that shameless cut and paste?  It's one thing not to credit the proper author or source, but I hope you kids at least remove the page numbers before you turn in your homework. ;)
If it will help my score, I could post all of the source to org.apache.commons.net.ftp as an example of an FTP Client.
I only posted that from my notes, its a program I did way back and had to document in lecture notes.  Lazynes I suppose ;)
>>its a program I did way back and had to document in lecture notes

You gotta be careful. If one were to do a quick verbatim search on the web using your code, they may think you were really the distinguished gentleman from Ireland, Prof. David Sinclair of DCU. A small price to pay for Lazynes, i suppose.  ;)
ist249:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

- Points to pronane

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

girionis
EE Cleanup Volunteer