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. Hi,
I want to write an Android Application,

View Tutorial          By: Kara at 2014-11-20 07:39:03

2. i had a problem in running a java software jdk1.5.
View Tutorial          By: tej at 2009-06-30 08:50:27

3. aoa i am for the first time learning programing pl
View Tutorial          By: manaal siddiqui at 2011-11-02 09:38:00

4. Hi, I need the complete working code for recieving
View Tutorial          By: Issam at 2008-09-26 01:24:04

5. very simple explanation......
easily unders

View Tutorial          By: saurabh at 2009-04-17 16:02:30

6. Hi this is very clear and helpful, I would like to
View Tutorial          By: JoelC at 2012-11-06 16:23:19

7. Hi please help me out..

i am gettin

View Tutorial          By: sasivarnan at 2011-04-22 14:15:40

8. This tutorial is so simple, often we dont need to
View Tutorial          By: NIrjhar at 2011-12-12 03:29:52

9. grazie!!!
View Tutorial          By: Egidio De Lorenzo at 2011-04-20 12:07:25

10. Nice one....
View Tutorial          By: vinod at 2010-05-06 23:36:15