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. Using HTTP Redirect as per your suggesion, worked
View Tutorial          By: Balram at 2008-03-21 01:27:02

2. Thanks summarized and useful
View Tutorial          By: Pegasus_Silvershade at 2010-09-10 18:02:49

3. hello Ramlak I am getting Error Time Out At Step 6
View Tutorial          By: hardik at 2011-04-13 05:12:06

4. Thank you very much you resolved my issue.
View Tutorial          By: ketan at 2012-02-01 11:16:47

5. thanks for the definition...more power :)
View Tutorial          By: saluki at 2011-07-19 05:36:00

6. How do u edit the text ? this is always replacing
View Tutorial          By: anurag at 2012-08-23 07:24:47

7. sir plz give ur sugissions for my golden future in
View Tutorial          By: sridevi at 2012-06-06 10:26:36

8. please try to elaborate the explanation with examp
View Tutorial          By: bhavitha at 2014-02-21 06:09:12

9. Muchas gracias por compartir informacion. :)
View Tutorial          By: Anonymous at 2009-05-21 08:48:47

10. excellent..... thanks it help me a lot.......
View Tutorial          By: REJAPUTRA at 2009-10-23 09:19:25