CSCI.4220/CSCI.6964 Network Programming

Fall, 2002

Programming Assignment 3.

 

This assignment is to be done either individually or in pairs. Do not show your code to any other group and do not look at any other group's code. Do not put your code in a public directory or otherwise make it public. However, you may get all the help you need from the TAs or the instructor. You are encouraged to use the WebCT Discussions page to post problems so that other students can also see the answers.

Objective:

The objectives of this assignment are:

  1. To gain an understanding of how some of the common Internet application protocols are designed,
  2. To be familiar with how standard protocols are specified in RFCs, and
  3. To understand how HTTP and SMTP protocols work and implement them according to their respective RFCs.

In this assignment, you need to implement a multi-threaded HTTP server and an SMTP client. Your HTTP server should implement both the GET and POST methods and should support the following functionalities:

Both the index page and the email form page should be dynamically generated by your HTTP server using HTML. You should not use any external HTML files for these pages or any other HTML page for this assignment.

Your should work with browsers that are HTTP/1.0 compliant. 

You should not use servlets or any existing SMTP or HTTP classes in this this assignment.

Your program should take a command line argument specifying what is the port number it will use.

  All exceptions must be properly handled.

Extensions:

Completion of one of this extensions will result in a better grade; however, groups of more than one person MUST complete this extension to receive a full grade. It should also be noted that, if you have an idea for a different extension, ask either the instructor or TAs for approval:

  1. Enhance your SMTP client to support attachments
  2. Support default values in the email form page. The default values should be passed from the client as parameters using the GET method and a properly URL-encoded string as attachment.
  3. Implement an interface between your HTTP server and the calendar application you have implemented in PA2.

Grading:

Grading will be split in the following way:

Submission:

The due date for this project is October 1st, 2002, 11:55pm EST. You should use the assignments drop-off box located at the course's WebCT page. Upload a JAR file containing all the relevant documented Java files, along with a README file describing the project and its usage.

Late submissions:

Useful Links: