I have homework and I am completely lost. I am not fluent in java (or any other programming language). I am really struggling with these upper level java classes not knowing the basics of java. Long story on how that happened. Here is the assignment.
Write a program in Java that uses sockets to connect to a web server on port 80, requests a web page using GET of the HTTP protocol, and displays the resulting HTML
Ok i pretty much understand the socket thing, but i have been unable to find any info in the get of the http protocol. everything that shows up is relating to url connection, however, i don't think that is the assignment.
here is what i have for the socket so far which i got from a youtube tutorial so i don't have that great of a grasp on it.
Not looking for the assignment to be done for me. Just some help in the right direction please. and some links would be amazing.import java.io.*; import java.net.*; public class Server { public static void main(String[] args) throws Exception { Server SERVER = new Server(); SERVER.run(); } public void run() throws Exception { ServerSocket one = new ServerSocket (80); Socket myskt = one.accept(); InputStreamReader IR = new InputStreamReader(myskt.getInputStream()); BufferedReader BR = new BufferedReader (IR); String message = BR.readLine(); System.out.println(message); if (message != null) { PrintStream PS = new PrintStream (System.out); PS.println ("Message Received"); } one.close(); } }