Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


Access HTTPS Server vi Standard Java Socket

Posted on 2007-08-08
Medium Priority
Last Modified: 2012-08-13
I would like to receive a webpage from https://mydomain.com over a Standard Socket.

HTPS runs in SSL Mode and i have to treat my Socket according to it. Is there any example or suggest, how i can do this?

MyTarget is that i can receive a webpage over HTTPS with a plain socket.
Question by:woigl
LVL 86

Expert Comment

ID: 19652349
>>MyTarget is that i can receive a webpage over HTTPS with a plain socket.

Why not use HttpsURLConnection?
LVL 92

Expert Comment

ID: 19652375
to just create socket see:


to access a https page you can use URLConnection same as you'd use for http

        URL url = new URL("https://www.objects.com.au");
        URLConnection conn = url.openConnection();

Author Comment

ID: 19652392
Exactly that is not what i want... i wanna do it over a plain Socket or SSLSocket. I am writing a Client-Server Application which uses right now the HTTP Tunneling method to communicate. This works fine so far... now i wanna use HTTPS Tunneling... Thats why just a plain Socket.
LVL 92

Accepted Solution

objects earned 500 total points
ID: 19652413
then either of the appraoches I posted will work.
they would handle a ssl handshake allowing you to read the data from the stream
LVL 26

Assisted Solution

ksivananth earned 500 total points
ID: 19652420

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
Suggested Courses
Course of the Month15 days, 3 hours left to enroll

577 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question