I have opened a connection (httpURLConnection) betweend two servlets (a servlet
and a jsp page to be exact) with the intend to have them exchange messages.
Servlet A sends a message to B and B answers back. This is as far as the
communication is good. Now if B tries to send to A (right after the previous
exchange of messages) A receives nothing... the reader returns either a
nullPointerException if it reads a string or some new line characters if the
input is not buffered.
I can't think of a satisfactory explanation for this...
I am thinking that maybe B sends too fast for A but I do not think so, I used
BufferedReader/Writer...
I do not know if it has to do with the connection. But it works fine during the
part of the communication when A send to B and B responds.. (I used
setDoInput/Output methods to set the connection for both inupt and output)
Any suggestions anybody?