Comment on Tutorial - java.io.IOException: HTTPS hostname wrong: should be By Ramlak



Comment Added by : Mahendra

Comment Added at : 2012-05-24 10:57:25

Comment on Tutorial : java.io.IOException: HTTPS hostname wrong: should be By Ramlak
Hi,

can we use only code given below :

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);


and to which function we have to pass the URL??
can u provide sample code?


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. I'm trying to follow this backward, but I can't fi
View Tutorial          By: DMM at 2014-03-14 21:42:06

2. it is a good example thanks
View Tutorial          By: tadeleh at 2012-11-13 12:46:08

3. This tutorial was absolutly amazing!
Simple

View Tutorial          By: Anita at 2009-05-09 06:29:21

4. i am using the same code to read data from an RFID
View Tutorial          By: JayS at 2015-02-03 21:31:36

5. hello all,
i have this error.
Except

View Tutorial          By: daniel at 2012-08-12 18:50:04

6. you do the same as after
Private Sub Button

View Tutorial          By: John McCode at 2013-05-24 07:57:31

7. I'm sorry but your closing statement...

View Tutorial          By: Al Scherer at 2009-09-15 09:33:24

8. can you give the program about the fast food by us
View Tutorial          By: grace at 2008-09-22 00:48:37

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

10. thanks
View Tutorial          By: nitin at 2010-03-29 01:02:57