Download https file using java?

How to upload a file via https (secure) using java? While I'm sending the same thing as the http url, it throws an exception like "javax.net.ssl.SSLHandshakeException: remote connection to the remote access node during a handshake." Can anyone advise me how to upload a file to https using java? Thanks in advance.

+3
source share
2 answers

You can use apache commons-fileupload, here is sample code

+3
source

You need to put the ca certificate that signed the server certificate in the keystore and specify the keystore path in the javax.net.ssl.trustStore system property.

0
source

Source: https://habr.com/ru/post/1787421/


All Articles