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 use this all the time. You can use this exactly
View Tutorial          By: Chetan at 2015-09-08 08:56:06

2. i am trying to run the above example in eclipse bu
View Tutorial          By: Prathyusha at 2015-03-10 11:01:06

3. Explanations and examples are more clear. I like i
View Tutorial          By: Rajkumar S at 2010-07-12 22:28:40

4. Hi i have studied these programs.
but unabl

View Tutorial          By: Karuna at 2008-03-30 08:46:00

5. I have error on "serversocket", vb.net h
View Tutorial          By: stephen at 2012-07-14 19:40:03

6. As C does not support Function Overloading, there
View Tutorial          By: N at 2013-03-06 00:27:14

7. the DomParserExample.java shows MAlformedURLExcept
View Tutorial          By: dipesh at 2011-12-09 09:53:46

8. Very good example .. i ve written this program . P
View Tutorial          By: gomz at 2011-09-26 12:33:54

9. gud tutorial but the permission denied is because
View Tutorial          By: amithooda at 2012-06-11 06:43:00

10. it is good site , and i have cleared my doubts
View Tutorial          By: imtiaz at 2009-10-15 23:43:50