ECT 433: Survey of Web Programming Technologies

Autumn 2003

Assignment 1

Running and Modifying a JSP Application

Due Monday September 22 before 11:30pm

Summary

The goal of this assignment is to get Tomcat running and modify a simple JSP example presented in class. The necessary modifications all use coding constructs demonstrated in class. In particular, you will modify the rate2 application so that it also takes a comment, allows the user to confirm the rating, and provides a summary of all ratings and comments.

Instructions

Download and run the examples presented on the first day of class. They include the applications that start with rate.html, rate2.html and formExample.html. Here are instructions for installing and running Tomcat. Also, included are instructions for running the examples and how to run Tomcat in the CTI lab. Make simple changes to the HTML formatting so that you can see their effects through a Web browser.

For all class assignments, you are strongly encouraged to take an incremental approach when developing your applications. That is, implement one feature and test it before preceding to the next requirement. Trying to write the whole assignment before you do any testing will make it much harder to resolve any problems in your code. To encourage incremental development, this first assignment provides a step by step approach.

  1. Make a copy of the ect433examples folder and name it with your login ID. Rename rate2.html and rate2.jsp to comment.html and comment.jsp. Modify comment.html so that it works with the new filename. The Web application should now run with comment.html.
  2. Add a small text field to the form in comment.html so that the user can provide a phrase or short sentence with the rating. You may assume that the phrase is typed on one line.
  3. Modify comment.jsp so that the comment is also saved to the file.
  4. Modify comment.jsp so that it provides a table listing the ratings and comments of all users.
  5. Create an intermediate page between comment.html and comment.jsp that allows the user to confirm the rating value before it is submitted and saved by comment.jsp. The application should allow the user to return to comment.html and select a different rating. Call this confirmation page confirm.jsp.
  6. Create an error page called error.html that is shown to the user in case any exceptions occur when running your jsp files. See page 79 in FKB on how to do this.

Additional requirements

You may complete this assignment with at most one other student taking this course. Make sure that the names of the authors are included as comments in all submitted files.

Each file should have a short comment explaining what the file does. Complex code should also be annotated with appropriate comments.

You are encouraged to further format the html in the files so that their content is aesthetically displayed. Neatness and elegance count!

Submission

You should submit a zip file that includes the contents of your web application files. Use the assignment submission application on the Distance Learning Web site.

If you are completing this assignment with one other student, make sure both names are commented in all html and jsp files. Only one submission is needed.