I am making a connection from Android client to Servlet using url connection. I am sending a string to server on button click.Server is receiving string and able to print it. When the Servlet sends response as a string, The Android Client Client is showing the following Exceoption
java.io.StreamCorrupted Exception
What can be the reason for such an exception?
I am making a connection from Android client to Servlet using url connection. I
Share
This exception will be thrown if the expected input stream is not proper.
For example:
If the expected input stream on the client side is ObjectInputStream and the server is not writing using ObjectOutputStream.