CSc31800 Internet Programming

Spring 2004, CCNY-CUNY, Jinzhong Niu


Project #2 - Web Client (due on next Wed - Feb. 25)

The goal of this project is to develop a web client, which can obtain an HTML page and output it as plain text if its URL is given as a command line parameter. You are strongly recommended to do so in Java, though C/C++ may also be used. Your program is supposed to work in the following way:

Suppose the main class of your program is WebClient.class. Then the following command should ouput the content of our department homepage:
 
$ cd <directory holding your classes>
$ java WebClient http://www-cs.engr.ccny.cuny.edu/

<html>
<head>
<META 
     HTTP-EQUIV="Refresh"
          CONTENT="0; URL=general/index.html">
<title>CCNY: Department of Computer Science</title>
<link rel="stylesheet" type="text/css" href="_styles/csdept.css" name="cs">
</head>
<body>
</body>
</html>

You need to write a report with about 1-2 pages describing your design and how your program works step by step, i.e. how an HTTP connection is setup, how a request is generated for the sepicified URL and how the response from the server is processed before displayed as plain text.

You are supposed to type your report into computer and hand in a printed copy of both the report and your program.


© Jinzhong Niu, 2004