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. Sorry dude! when i am trying to compile your progr
View Tutorial          By: Avijit M. at 2007-09-14 00:43:55

2. constructors are not to be called. when you make a
View Tutorial          By: niyati at 2011-05-28 07:57:52

3. You have stretch it more then enough even then the
View Tutorial          By: Chirag at 2012-12-04 16:15:13

4. Windows XP
libmySQL.dll in package MySQL5.1

View Tutorial          By: Bingo at 2009-11-07 20:11:52

5. super example...it very useful for me...
View Tutorial          By: elan at 2011-06-02 07:54:39

6. Hello! May I know where is the "main" fu
View Tutorial          By: Angelia at 2009-06-25 18:54:28

7. I'm getting the following error even after several
View Tutorial          By: Joe85 at 2011-03-18 08:58:04

8. Thanks.. worked perfectly :)
View Tutorial          By: DJ at 2012-04-05 19:40:43

9. After a week of struggle, succeeded in sending mes
View Tutorial          By: Balaji G L at 2014-07-20 16:05:25

10. Thank you. I found this very helpful.
View Tutorial          By: tavella at 2014-09-26 01:04:13