hello, i've some issue setting up connecting between 2 PC's (in the same room) for a client-server experiment. i would appreciate any comments for this problem.
my logic for the server-side is i have a
servlet in a WAR file that accepts request from a client(to retrieve the file requested by the client). the file is broken down into pieces by using FileInputStream, and then sent to the client by using HttpServletResponse.
on the client side, i am connecting thru the server using URL class, opening a connection then reading whatever the server sends.
for some reason, whenever the client asks for a file, the server sends a corrupt file (unreadable). why is this occuring? am i using the wrong approach for this problem (should i use Sockets or RMI instead)?