[RESOLVED] Complex loop question on a client app
while (true) {
try {
System.out.println("Enter a message to send to the server:");
nextline = stdIn.readLine();
if (nextline != null) out.println(nextline);
fromServer = in.readUTF();
if (fromServer != null) System.out.println("From server " + fromServer);
else {
out.close();
in.close();
csocket.close();
stdIn.close();
}
} catch (Exception e) { }
}
It asks me to enter a message, I enter something and it sends it to the server.. perfect. BUT it just doesnt do anything after that, it just halts. I want it to print 'enter a message' again, and also be able to print messages from the server. Hope someone can help.

