Access HTTPS Server vi Standard Java Socket

Posted on 2007-08-08
Last Modified: 2012-08-13
I would like to receive a webpage from 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

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

    Why not use HttpsURLConnection?
    LVL 92

    Expert Comment

    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("");
            URLConnection conn = url.openConnection();

    Author Comment

    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

    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


    Featured Post

    Live: Real-Time Solutions, Start Here

    Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

    Join & Write a Comment

    For customizing the look of your lightweight component and making it look lucid like it was made of glass. Or: how to make your component more Apple-ish ;) This tip assumes your component to be of rectangular shape and completely opaque. (COD…
    Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
    This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
    This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

    745 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

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now