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. how to create inode address using c++
View Tutorial          By: pooja at 2014-06-24 05:50:33

2. Nice one. I havn't thought of this before.
View Tutorial          By: Aniket Sawant at 2013-04-09 05:40:58

3. plz can u give me code for key excange b/n pda &am
View Tutorial          By: visnas at 2009-05-04 20:18:32

4. well written hog .good going
View Tutorial          By: Rajesh at 2010-08-17 03:38:05

5. Hi... it would be good if someone could send the r
View Tutorial          By: deb at 2008-02-20 11:36:51

6. it is a good example to understand.
View Tutorial          By: nivedha at 2011-07-12 05:15:39

7. Hi, I am getting following exception while running
View Tutorial          By: Vasundhra at 2008-06-24 07:04:42

8. This is very good article.
View Tutorial          By: Vipin Joshi at 2008-03-27 13:53:26

9. Why this exception at run time?

Fri

View Tutorial          By: Sebin Joseph at 2011-04-01 06:03:17

10. in this statement "void Reverse(string &t
View Tutorial          By: vinay at 2012-12-13 16:41:59