Homework 5
CS320, Fall 2004
Due: Tuesday, Nov 23
Please upload your files using the online turnin server.
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 CS 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]
[Problem Description]
For this assignment, add a registration page to
the web calendar you developed in Homework 4
so a user can create an new account, and implement a custom tag
<logout> so we can get rid of the last bit of scripting element
from the application.
Again, all features described in previous assignments must work;
otherwise there will be a credit penalty of up to 30pt.
[Registration Page] (40pt)
In the registration page, ask the user to fill out a form for
username, password, first name, last name, and email, as shown in the
following example:
Your application should properly handle the following situations:
- Errors, including but not limited to
- required fields are empty
- username is shorter than 4 characters
- username conflicts with an existing username
- password is shorter than 6 characters
- password and re-typed password do not match
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.
- Special characters, especially single quotes in names.
- Optional fields are empty. Note that this should not be
handled as an error.
[Logout Tag] (20pt)
Implement a <logout> tag so that instead of using scriptlets as
described in Homework 3, your logout code
should look somewhat like the following:
<c:if test="${! empty param.logout}">
<cal:logout />
<c:redirect url="Login.jsp" />
</c:if>