Skip to Main Content

Java Security

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

https SSL issue

843811Oct 20 2007 — edited Oct 20 2007
I am try to connect to a https page, however, I can't get through the SSLhandshake. Can anyone help me with this issue?

If i try to get the page (https://progate.daps.dla.mil/home/) in IE, It says that "Theres a problem with this website's security certificate and I have to click on "Continue to this website (not recommend)" to go in the website.

I want to know how can I get to the website in Java.

Heres my testing program:

{code}import java.net.URL;
import java.io.*;
import javax.net.ssl.HttpsURLConnection;

public class Test
{
public static void main(String[] args)
throws Exception
{


String httpsURL = "https://progate.daps.dla.mil/home/";
URL myurl = new URL(httpsURL);
HttpsURLConnection con = (HttpsURLConnection)myurl.openConnection();
myurl.
InputStream ins = con.getInputStream();
InputStreamReader isr=new InputStreamReader(ins);
BufferedReader in =new BufferedReader(isr);

String inputLine;

while ((inputLine = in.readLine()) != null)
System.out.println(inputLine);

in.close();

}
}{code}
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 17 2007
Added on Oct 20 2007
1 comment
126 views