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. Bitwise OR is a pipe (|), not a logical NOT (!)
View Tutorial          By: Martijn at 2011-06-21 10:49:29

2. I am trying to connect mobile to PC. I put your ex
View Tutorial          By: Dedo at 2011-11-30 17:45:32

3. /*for (i=0; i<lim-1 && (c=getchar())!=E
View Tutorial          By: GD at 2012-07-14 12:47:27

4. Real Life example of using Volatile
*******

View Tutorial          By: Mayank at 2011-01-25 15:44:21

5. Hi all
I connected my mobile wi

View Tutorial          By: sruthy at 2010-07-07 03:44:27

6. One of the best
View Tutorial          By: Sudhir at 2009-12-22 01:45:28

7. really helpfull and gets all the stuff what u want
View Tutorial          By: yash at 2009-10-25 12:28:57

8. hi iam new to java i need simple java programs pls
View Tutorial          By: naga at 2010-10-06 03:45:18

9. i am getting a force close...can anyone please hel
View Tutorial          By: jack at 2012-03-22 15:18:37

10. hi sr.
do u have any idea , how to convert

View Tutorial          By: gohila at 2012-08-15 14:31:31