Lab 10: Networking

  1. Review Lecture 11.
  2. Log in to a computer that is running Linux and connected to the Intraweb.
  3. Create an empty directory named javalab10/ in your directory.
  4. Open Kate and change to the javalab10/ directory.
  5. Retrieve a web page by telnetting to the HTTP port.
    1. At the Kate shell prompt, type: 
    2. Carefully type the following without pressing backspace or making a mistake: 
    3. Press enter two times. You should then see the HTML of the page displayed.
    4. Repeat the exercise but redirect the output to a file and then view the file: 
    5. Repeat but request only the header.
    6. Repeat but use a file that is not on the server.
    7. Repeat but use the command HELLO instead of GET.
  6. Retrieve a web page using a Java web client that uses stream sockets.
    1. Copy WebGet.java to your folder, open the source in Kate, and compile it.
    2. To run the program, type: 
    3. Repeat but use a file that is not on the server: 
  7. Retrieve a web page using a Java web client that uses a URL connection.
    1. Copy URLGet.java to your folder, open the source in Kate, and compile it.
    2. To run the program, type: 
    3. Repeat but use a file that is not on the server: 
  8. Compress the folder using the Ark archiving program to produce javalab10.zip.
  9. Send the javalab10.zip file to gvogl@umu.ac.ug as an attachment in a message with subject java lab 10.