Forums Register Login

HttpURLConnection

+Pie Number of slices to send: Send
Hi Guys!!
I am facing a problem wherein i have been unable to set the timeout parameter for HttpsUrlConnection. Please let me know if i can set the timeout parameter using the URLConnection class or the HttpUrlConnection or the HttpsUrlConnection (using the JSSE api's)
Any insight into the above stated problem would be highly appreciable
Thanks and Regards
Vineet Venkatesh
+Pie Number of slices to send: Send
The Networking Properties guide lists the sun.net.client.defaultConnectTimeout and sun.net.client.defaultReadTimeout properties for URLConnection. This suggests they will also be used for its HttpsURLConnection subclass, but I was not able to confirm that. The JSSE Guide is silent on the matter.
- Peter
+Pie Number of slices to send: Send
Hi Peter,
Thanks for the insight ........... but i still am confused as to whether i can set the
" sun.net.client.defaultConnectTimeout " property specified in the NetWorking Guide properties and if so how and where do i do it to set the timeout properties for the HttpURLConnection. Do i need to set it as a system property?
Hope to hear soon from you.
Thanks and Regards
Vineet Venkatesh
+Pie Number of slices to send: Send
-Dproperty=value on the java command line (one or more times), or System.setProperty(property, value) at initialisation time.
- Peter
+Pie Number of slices to send: Send
This is per JVM setting? can I set it per connection? Or I have to set it before I use it and reset it after I am done. This is inconvenience when I'm in the multiple thread environment and I'm changing the other HTTP connection behavior?
Don't sweat petty things, or pet sweaty things. But cuddle this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 1037 times.
Similar Threads
post to a different system's servlet
Https post, through Proxy settings
Https post, through Proxy settings
Is there a way to ping http/https application from Java?
HttpsURLConnection ClassCastException Question
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 07:17:02.