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



Ask a Question

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. i am new to java, please send simple programs, and
View Tutorial          By: jegan at 2011-07-11 02:22:37

2. hello!!can anyone help me. can you send me the com
View Tutorial          By: denisse at 2008-01-07 05:40:25

3. @ anub : This is because you need to add external
View Tutorial          By: Sushil at 2009-09-09 12:24:23

4. Great! Thanks :)
View Tutorial          By: Shivang at 2010-10-10 11:53:54

5. Hi sir,
i have a critical problem when i dn

View Tutorial          By: Thiru at 2015-09-30 07:02:43

6. Thanks a lot :-) It is very informative
View Tutorial          By: praveen at 2010-05-03 22:17:19

7. superb its working perfect but one thing, we have
View Tutorial          By: venkatachalam at 2013-03-14 16:35:00

8. Hi, thi's sursh laveti, actually I'm getting a pro
View Tutorial          By: suresh l at 2015-06-24 07:53:19

9. My Page URL- http://localhost:8080/WebApplication1
View Tutorial          By: aMIT sURI at 2012-05-12 10:43:21

10. Till now, I have'nt done any certifications. I am
View Tutorial          By: Subhash at 2012-03-15 10:48:29