Compile HTTPClient.java, as shown in Figure 7. Run it to contact a web server whose name you know (you don’t need to have access to it) to (i) fetch a file you know that exists, and (ii) fetch a file that you know that does not exist. Capture the output of each run on hardcopy. Analyze the lines in the response from the server in each case and identify the different parts (status line, header line(s), and body) in each case.

What will be an ideal response?


(i ) fetching a file that exists.





(ii) Fetching a file that does not exist:!





Note that the body is a message, phrased in HTML, generated by the HTTP server.

Computer Science & Information Technology

You might also like to view...

You can apply number formats to any cell.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

To set the node to the right of the text in a label lbl, use _______.

a. lbl.setContentDisplay(ContentDisplay.TOP); b. lbl.setContentDisplay(ContentDisplay.BOTTOM); c. lbl.setContentDisplay(ContentDisplay.LEFT); d. lbl.setContentDisplay(ContentDisplay.RIGHT);

Computer Science & Information Technology

In Design view, the top portion of the window contains the ________, which lists all the fields in a table or query

Fill in the blank(s) with correct word

Computer Science & Information Technology

Explain the purpose of a local security group.

What will be an ideal response?

Computer Science & Information Technology