I assume you are using printwriter and buffered reader?
you would need to do something like
out.println(textField.getText());
textField.setText("");
Where textField is the field where the user is typing and out is your printwriter.
On the server you need to capture that text.
so something like
String input = in.readLine();
Where in is your bufferedreader. The tricky part is doing it as the user types, you need to detect the change in the textfield and pipe the information every time the characters change. http://www.coderanch.com/t/609096/java/java/Realtime-update-changing-JTextField this is a very good tutorial on that subject.