Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HTTPS and Java

 
Matthew Mellott
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So I've been trying to post to this url. Every diffrent way I try it I get the same errors:



I have no idea what these errors mean, let alone how to fix them. Here's my code:



I've used the SSLSocket class before without getting this error. I also tried implementing the above code using an SSLSocket and got identical errors to the ones above.
Thanks for the help!
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're in luck: that's a FAQ - the SecurityFaq answers it.
 
Unnar Björnsson
Ranch Hand
Posts: 164
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've never done any http work with java but it seems to me that the site you are requesting https connection is missing or has expired SSL certificate. If you request webpage through https that has no SSL via browser the browser emits a warning. You can add an exception to that site if you want to, similarly (assuming that my first assumption about this exception is correct) you should be able to ignore this exception by putting the corresponding code in a try-catch block.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic