HW2: Forms and Servlets

Due: Friday 6/28/2002
at 5pm
[10 points]

The purpose of this homework is to give you some experience with using forms to gather information from a web user and using scheme to generate a web page using that information.

For this homework you are to write a program, hw2.servlet, which has prompts the user for some information (e.g. a survey, an order form, an information request form, etc...). When the user submits the form, the servlet should send a confirmation email to the user, store the users information in a file, and generate a confirmation webpage for the user. The structure of the servlet should be something like the following:

(servlet (a b ...) (case a ((#null) { ... html of a form to get data from user ...}) (else ...send mail to user ... ...send mail to yourself ... ...log the data in a log file... generate response page ))) The servlet should make use of the following features:

Feel free to be creative!
If you want to be fancy you can have an initial page that gets some information from the user and then sends them off to one of several other pages....

Hint: start small and build your servlet up a little at a time. This makes it easier to find and correct errors.

Feel free to copy any of the servlets shown in class and extend them to meet the homework requirements.