HttpUrlConnection getResponseCode throwing java.net.SocketException: Unexpected end of file from server
"SocketException: Unexpected end of file from server" from servlet but not from standalone application