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



Comment Added by : java

Comment Added at : 2012-08-22 09:39:57

Comment on Tutorial : java.io.IOException: HTTPS hostname wrong: should be By Ramlak
had the sample problem.. java.io.IOException: HTTPS hostname wrong: should be <server_ip>
Used following code as specified in the post .. & it worked

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

Thanks.


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, Thanks for your beautiful tutorial.

View Tutorial          By: Chintan at 2011-10-06 07:35:01

2. The logo is a cup of coffee. Java is an island in
View Tutorial          By: kamal goduguluri at 2012-05-30 15:34:21

3. sir, could you please tell me about minimum and ma
View Tutorial          By: priya dwivedi at 2012-01-04 15:01:03

4. finally an understandable example
View Tutorial          By: sdf at 2012-11-26 21:44:34

5. Hello guys, I'm developing java program to send SM
View Tutorial          By: Rania at 2010-09-08 09:04:47

6. 0
View Tutorial          By: zareen at 2011-08-20 08:27:28

7. hi in the above example u created a example for do
View Tutorial          By: akki at 2013-02-22 06:19:14

8. great solution and brief explanation, love it.
View Tutorial          By: habesha at 2011-12-02 16:14:45

9. Hi, thi's sursh laveti, actually I'm getting a pro
View Tutorial          By: suresh l at 2015-06-24 07:53:19

10. What if I wanted POST instead of GET?
View Tutorial          By: Otto at 2011-06-12 15:38:50