Comment on Tutorial - java.io.IOException: HTTPS hostname wrong: should be By Ramlak



Comment Added by : java

Comment Added at : 2012-08-22 09:39:57

Comment on Tutorial : java.io.IOException: HTTPS hostname wrong: should be By Ramlak
had the sample problem.. java.io.IOException: HTTPS hostname wrong: should be <server_ip>
Used following code as specified in the post .. & it worked

HostnameVerifier hv = new HostnameVerifier() {
public boolean verify(String urlHostName, SSLSession session) {
System.out.println("Warning: URL Host: " + urlHostName
+ " vs. " + session.getPeerHost());
return true;
}
};
HttpsURLConnection.setDefaultHostnameVerifier(hv);

Thanks.


View Tutorial



Subscribe to Tutorials

Related Tutorials

Program using concept of byte long short and int in java

Update contents of a file within a jar file

Tomcat and httpd configured in port 8080 and 80

Java File

Java String

Count number of vowels, consonants and digits in a String in Java

Reverse a number in Java

Student marks calculation program in Java

Handling Fractions in Java

Calculate gross salary in Java

Calculate average sale of the week in Java

Vector in Java - Sample Program

MultiLevel Inheritance sample in Java

Multiple Inheritance sample in Java

Java program using Method Overriding

Archived Comments

1. /*Overridding & equals:--> Overriding is an
View Tutorial          By: Naveen Kumar at 2011-04-30 18:44:55

2. excellent code.....
View Tutorial          By: Anonymous at 2009-05-07 03:09:01

3. Have you tried checking for the latest office/exce
View Tutorial          By: Pat at 2010-01-07 04:54:31

4. It is working. Thank u dear!!!
View Tutorial          By: Ashwani Rana at 2009-04-02 03:56:17

5. Nice Article.
View Tutorial          By: Swathi Kumar at 2012-04-15 10:44:14

6. The name OAK was changed to java because ,once the
View Tutorial          By: Sowminarayanan at 2010-11-28 06:17:42

7. i can write much easy program than this its more c
View Tutorial          By: nand kishor singh at 2010-08-10 12:24:22

8. Everything is running.... But it doesn't send....<
View Tutorial          By: uu at 2009-04-09 18:10:13

9. why are we using it ch = str.charAt(i);
View Tutorial          By: Rumman at 2014-10-10 19:42:42

10. Hi,

can we use only code given belo

View Tutorial          By: Mahendra at 2012-05-24 10:57:25