wood burning stoves 2.0*
The moose likes Sockets and Internet Protocols and the fly likes Writing to files using socket server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "Writing to files using socket server" Watch "Writing to files using socket server" New topic

Writing to files using socket server

Patrick Boos

Joined: Sep 09, 2008
Posts: 15
I am having a problem writing to a file on a socket client/server application. I can send the data from a JTextArea to the server, it appears to read the text, but I cannot seem to get the server to write the data to the .txt file. Here is the server code:

Thank you.
Rusty Shackleford
Ranch Hand

Joined: Jan 03, 2006
Posts: 490
Too much irrelevant code to comb through.

You best bet is to put a println statement right were the sever receives the string, and see if it did in fact get it. If it did, then move it along the path of execution to see where something went wrong.

"Computer science is no more about computers than astronomy is about telescopes" - Edsger Dijkstra
vinoth sathiyamoorthy
Ranch Hand

Joined: Sep 30, 2008
Posts: 31
do you want save the read file?
It is sorta covered in the JavaRanch Style Guide.
subject: Writing to files using socket server
Similar Threads
Transfering data from the textbox in one class to a method in another class
Unable to populate String
can't get server to send file to client
Help!!!!!! GridBag Layout constraints
client and server network