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. This is a simple app and its working good.......
View Tutorial          By: sathish at 2012-04-23 12:16:07

2. Very good. but why i can search data then report v
View Tutorial          By: ARMAN AHMED at 2015-04-27 13:18:04

3. example is good for understand what is the functio
View Tutorial          By: Ankit Shukla at 2009-09-17 15:25:17

4. method overloading possible across classes????
View Tutorial          By: Rohit at 2011-01-26 20:23:02

5. sir i want how to write record into file and readi
View Tutorial          By: himasekhar at 2013-05-25 10:38:31

6. it's really Nice Clock
View Tutorial          By: Mido at 2007-09-09 08:45:49

7. very nice example
View Tutorial          By: harshal at 2013-02-06 09:34:10

8. I am trying to execute the same code but still una
View Tutorial          By: Sona at 2015-06-11 18:35:13

9. Hi,

Can we use this fix.php on the

View Tutorial          By: Chriz at 2010-07-05 09:22:57

10. farhaan, thats why I said, "Using the HTML Bu
View Tutorial          By: Charles at 2008-03-21 01:36:46