Hi All,
I am using weblogic.net.http.HttpsURLConnection provided by the weblogic 5.1 for connecting to a third party server("https://hostname/--/---") through my servlet.I have a proxy server in between my webserver and the third party server.I am using the following code to make the
servlet go through the proxy.
Properties props = System.getProperties();
props.put("https.proxyHost","proxy IP address");
props.put("https.proxyPort","proxy port");
String parameters = parameters to be sent to the 3rd party
String stringUrl = "Https://3rd part hostname/--/--" +
parameters
URL url = new URL(stringUrl);
weblogic.net.http.HttpsURLConnection connection = new weblogic.net.http.HttpsURLConnection(url);
connection.setDoOutput(true);
System.out.println("Connection : " + connection.getResponseCode());
Before getting the response code, i am getting the following exception.
Server Certificate SubjectDN CommonName received does not match Server hostname and then
java.net.ConnectException: Tried all: 1 addresses, but could not connect over HTTPS to server: third party server name, port 443.
Where is the problem?How to fix the problem?
Pllllllease HHHHHHHHelp MMMMMMMMMMeeeeeeeeeeee
Thanks in advance
Ashok