Homework 5 (Extra Credit)
CS320, Fall 2007


Due: Friday, November 30

Please upload your files to CSNS. The files should include all the source code, documentation, and an HTML file hw5.html, which contains a link to your JSP page on the CS3 server. Note that file uploading will be disabled automatically after 11:59PM of the due date, so please turn in your work on time.

[Reading]

[Registration Page] (25pt)

For this assignment, add a registration page to the online movie review application you developed in Homework 4 so a user can create an new account. In the registration page, ask the user to fill out a form as shown in the following example:

Username:

Password:

Retype password:

First Name (optional):

Last Name (optional):

Email (optional):

Your application should properly handle the following errors:

For each type of errors, output an error message and ask the user to re-enter the data. Note that validation of the input data should be implemented on the server side, i.e. not in JavaScript. Optional fields can be empty, which should not be treated as an error. However, if a user do provide the optional information, you must store it in the database.

Once a user is registered, they may add movies or reviews as described in previous assignments.

[Paged Display] (45pt)

Modify you movie index page so it only displays the five most recently added movies. For example:

Welcome to CS320 Movie Reviews
Title Avg. Rating
The Game Plan 9.0
The Kingdom N/A
Resident Evil: Extinction 7.9
Good Luck Chuck 6.5
3:10 to Yuma 8.6
More Movies

When a user clicks on the More Movies link, the application shows all the movies in the database in a paged display. For example:

Add A Movie
Title Avg. Rating
The Game Plan 9.0
The Kingdom N/A
Resident Evil: Extinction 7.9
Good Luck Chuck 6.5
3:10 to Yuma 8.6
Pages: [Previous] 1, 2, 3 [Next]

For this assignment, you must use Displaytag (http://displaytag.sourceforge.net/11/) to create the paged display. You should have at least eleven movies in your database, and display five movies per page.