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. its nice explanation.
View Tutorial          By: rahul ahuja at 2010-06-13 22:33:35

2. Good stuff.
View Tutorial          By: flazwbooks at 2010-07-18 05:50:50

3. Hi Jon,

It really depends on the ap

View Tutorial          By: Hong at 2009-05-04 20:40:28

4. when i use this, the textarea automatically create
View Tutorial          By: gary at 2011-06-08 07:14:09

5. Fantastic yaar .realy very good n simple example..
View Tutorial          By: Satya at 2012-10-11 09:33:17

6. what if i am running on localhost?
what shd

View Tutorial          By: harish at 2010-02-03 03:47:08

7. it is not working
View Tutorial          By: shaishav at 2013-06-20 08:03:06

8. hi

im trying to run this project an

View Tutorial          By: VoyRufino at 2010-01-26 10:03:11

9. what will be the answer of this?
int y=10;<

View Tutorial          By: divye at 2015-03-20 09:05:46

10. Many thanks for this tutorial. Exactly what I was
View Tutorial          By: Fedor Emelianenko at 2010-10-28 08:01:17