When I try to open an https connection, it works fine, but the second time it fails because I set the value of the system property instead of the HttpsURLConnection connection. I have java.io.IOException error: Write: I / O issue when opening https connection a second time. I used the following code in my application.
System.setProperty("http.proxyHost", proxy); System.setProperty("http.proxyPort", port);
But when I changed the same below, it works fine.
javax.net.ssl.HttpsURLConnection ucon = (javax.net.ssl.HttpsURLConnection) urlWPF.openConnection(proxyserver); ucon.setRequestProperty("http.proxyHost", proxy); ucon.setRequestProperty("http.proxyPort", port);
If you set the system property, it applies to the entire application. If you want reset to match, you can follow two paths. Firstly, you need to update the server, and secondly, you need to change the HttpsURLConnection.setRequestProperty , which is indicated above, where necessary.
user3411924 Mar 12 '14 at 17:38 2014-03-12 17:38
source share