Programming Assignment 4.
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.
The objectives of this assignment are:
In this assignment you will have to perform the following tasks:
To learn how to write server-side Java applications for the web.
To understand what a servlet is and how it works.
To implement a simple servlet-based web application.
You can use your PA2 solution for this assignement. A working solution
of PA2 is available in this URL:
Design a simple web interface to the calendar application of PA2. The interface
should consist of an index file with an appropriate title, appropriate
instructions, a list showing today's events, forms for querying the calendar
and adding a new event. The forms that show the results of your query should
allow you to select a specific event, delete it, or update it. Use text
fields to enter your queries and use the POST method to submit your forms.
Write the HTML code to implement this interface and test it using a browser.
This HTML code will be used later as a model for the HTML code that your
servlet will produce later.
Implement a servlet that processes and responds to all the HTTP calendar
requests. Your servlet will use the calendar protocol developed in PA2
to communicate with the calendar server. Your servlet should use
the doGet and doPost methods.
Install and configure a servlet engine. The engine comes with the Java
Servlet Development Kit (JSDK), which is available from the Sun Microsystems
Web site at http://java.sun.com/products/servlet/archive.html. Use the
JSDK 2.1. For instructions on how to install this engine, you can refer
to pp 294-295 in your textook, Java Network Programming and Distributed
All exceptions must be properly handled.
Grading will be split in the following way:
60% correctness (Does it do what it's supposed to?)
20% error handling (Can it easily be crashed?)
20% documentation (Is it easy to read and understand the code?)
The due date for this project is October 8th,
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
Java files, along with a README file describing the project and its usage.
10% penalty for a one-day late submission.
25% penalty for up to a three-day late submission.
Submissions more than 3 days late will not be accepted.