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. Hi,
I want to read the barcode and print it

View Tutorial          By: Santu at 2013-03-12 18:15:18

2. hi Ashray P Shetty,
I'm getting the followi

View Tutorial          By: Balaji at 2010-11-25 14:16:23

3. Hi Dear All

How to do strike-out in

View Tutorial          By: Sandeep Mehta at 2012-11-21 06:54:06

4. Thanks! Very helpful in creating a program i am tr
View Tutorial          By: BHaos at 2014-12-05 16:32:53

5. Thank you. This is really awesome... Helped us a l
View Tutorial          By: Shivakumar at 2012-09-12 15:23:21

6. Hi all people...If i need to read a sms from the m
View Tutorial          By: Omarsi12 at 2009-09-06 17:11:15

7. HI, Thanks for your beautiful tutorial.

View Tutorial          By: Chintan at 2011-10-06 07:35:01

8. sir, in this example,which value of n is being sto
View Tutorial          By: shivom at 2012-01-15 07:16:49

9. excellent..... thanks it help me a lot.......
View Tutorial          By: REJAPUTRA at 2009-10-23 09:19:25

10. Very Helpful.
View Tutorial          By: nfahem at 2012-05-09 10:50:29