Try to give file name directly in the path at client side.
File outputFile = new File("yourfile.txt");
and then send it to server.
Because of exception FileNotFound
at client side , you are closing the the stream at finaly
block.
As you are closing the stream of client side, the server side does not recognize the stream from which it is reading hence giving Connection reset
exception.
As no stream is there for reading data at server side, you are getting NoSuchElement
exception
EDIT
Another thing is, you are not flushing the stream after writing to client,
So do pw.flush();
after pw.print(s)
and out.write()