Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Sockets and Internet Protocols and the fly likes URLConnection timing out before response is received - setReadTimeout does nothing Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Reply Bookmark "URLConnection timing out before response is received - setReadTimeout does nothing" Watch "URLConnection timing out before response is received - setReadTimeout does nothing" New topic
Author

URLConnection timing out before response is received - setReadTimeout does nothing

Mike Hul
Greenhorn

Joined: Aug 14, 2009
Posts: 1
I'm using a socket connection to send a POST request. Here's some code:



This works fine for requests where the response is relatively small. But for larger responses, the last step here often times out and throws an IOException. Setting the ReadTimeout property appears to do nothing, the connection just ignores it. Is there any way to set the timeout to a larger number WITHOUT resorting to using Apache HttpClient (or Sun's HttpClient for that matter since I'm working in the Google Web Toolkit environment and for some reason it doesn't allow you to use it).

Any help is appreciated. Thanks in advance.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: URLConnection timing out before response is received - setReadTimeout does nothing
 
Similar Threads
HttpUrlConnection - cXML PunchOutSetupRequest
How to POST data to a form
I'm trying to send XML to a servlet but the input is always null
how to wait my class for the servlet response
HttpURLConnection - Luanch Browser