I am connecting my android client emulator to server(Servlet). The output stream is working fine. Server is printing the message sent from client. Server is sending response
Such problems occur when the input connection in the previous page(or class) has not been closed. Check whether you've closed the input connection in the previous class
(by giving connection.close()).