• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Writing to files using socket server

 
Patrick Boos
Greenhorn
Posts: 15
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
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
Posts: 490
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
vinoth sathiyamoorthy
Ranch Hand
Posts: 31
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
do you want save the read file?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic