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. Da program wont work if '#' is the first character
View Tutorial          By: Kala at 2012-09-05 00:24:59

2. Hello my question is that . I want to run a audio
View Tutorial          By: Bharath at 2011-08-09 04:14:53

3. this is a very good artical about floating &
View Tutorial          By: Gayathri at 2012-10-31 12:19:28

4. Hi Everyone, i tried the code. im using Micromax
View Tutorial          By: adm at 2011-09-06 12:31:18

5. A more complete description of the common pitfalls
View Tutorial          By: Phil at 2012-11-25 02:06:49

6. hi thanks for your tutorial, but I can`t run your
View Tutorial          By: yashar at 2015-05-29 18:57:30

7. Dear admin,
your Recaptcha design is not go

View Tutorial          By: surendra kumar sharma at 2013-02-02 05:58:35

8. Its nice and really apriciate rakesh sir i try t
View Tutorial          By: prince at 2013-04-18 09:46:34

9. Thank you for this. I am a beg and this is making
View Tutorial          By: mac at 2011-08-23 13:47:15

10. Yeah..it's very good example....
View Tutorial          By: Packiyaraj.T at 2010-07-22 22:39:48