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. Hiiii Al, I am Ashraf Abu Aisheh, i am working to
View Tutorial          By: Ashraf Abu Aisheh at 2008-11-09 14:56:39

2. Imports System.Web
Imports System.Net.Mail<

View Tutorial          By: Naresh at 2011-05-24 07:27:12

3. When trying to install Java

i was

View Tutorial          By: Sinmo at 2009-08-30 00:31:33

4. i cannot add attachment
its saying
&

View Tutorial          By: Rintu Das at 2012-05-04 18:07:48

5. thank you so much i learn from your tutorial i wis
View Tutorial          By: Anonymous at 2009-01-03 20:08:41

6. Using ForwardAction for Integration is Good, Which
View Tutorial          By: Ramesh Ram at 2013-06-05 17:57:25

7. How can i update status 1 and 0 in RMS ?
an

View Tutorial          By: maaz at 2011-06-16 02:54:28

8. notify does NOT wake up the first thread waiting.
View Tutorial          By: Armin at 2009-07-26 07:25:09

9. Thanks to the author, it was really a good tutoria
View Tutorial          By: Ashok Kumar at 2010-04-29 05:54:47

10. Can i have CreateAddressBook.java?? really need it
View Tutorial          By: KIM at 2012-12-02 11:45:20