> Is it possible to set a timeout when opening a connection to an
> For example, is it possible to make the connection call and limit it to 5
> seconds before a response is generated?
> That is, I don't want to have to wait for the "default" timeout.
You can't do this using Sun's classes unless you use a "private"
property setting. Unfortunately, the setting is not guaranteed to
remain the same (or remain at all).
I've just been working on a similar task and used the
Commons-HTTPClient from Apache. It allows you to specify both a
connection timeout and also a timeout when reading the response. It
Solar Nexus Solutions