Hello Everyone,

Can you give me some idea on how to connect to an https site which requires user name and password? I would like to download or upload a file to the https using Java. Is this possible?

Any suggestions are greatly appreciated. Looking forward to your replies.

Thanks in Advance

>Can you give me some idea on how to connect to an https site which requires user name and password? I would like to download or upload a file to the https using Java. Is this possible?

Yes it is. Java Secure Socket Extension (JSSE). JSSE enables secure Internet communications.

JSSE provides a framework and an implementation for a Java version of the SSL and TLS protocols.

Thanks for your replies.

I read some articles and it shed me a light.

But I would like to know how can apply certificate for SSL. Previously I got this error:

Exception in thread "main" javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

I doing my work remotely then the IT Admin applied the certificate and the code is working now.

How was this certificate applied. I downloaded the InstallCert.java it generated a file but I have not able to apply it.

Thanks in Advance.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.