CGS4825, Assignment 5
Due Wednesday 12/7 at 11:59 pm
Zip and upload your cgs4825 directory. Exclude all .jar, .zip and
.war files.
-
Please use the following command to compress your cgs4825 folder.
Change to your root directory on ocelot and issue the command
zip -r username cgs4825 -x \*.jar \*.zip \*.war
Replacing username with your user name.
-
If you have any other archived files in your directory, like .rar, or .ZIP,
or .WAR, please remove them before zipping.
-
Check the size of the ZIP file, it should be less than 1 MB. If it is not,
then you probably have another ZIP file stored in the ZIP archive. Delete
it and re-zip.
-
Use my uploading program from ocelot to upload the file.
~downeyt/cs/public/webftp/webftp.pl
-
Upload the file as binary.
Web Application
Modify the HW4 web application. If you have not finished it, then see me
for assistance.
-
Place the JSPs for this appication in a directory named hw5.
-
Place the Controller and Bean in the hw5 package.
-
In the web.xml, add the normal servlet mapping for your controller.
-
In the web.xml, add an additional serlvet mapping for your controller, followed
by
/*
.
-
Choose one of your form elements as the business key field for your
application. There will only be one record in the database with this value.
-
Copy your style sheet to a new style sheet that will be used in this assignment.
-
For the edit page:
-
Add a radio group or a single selection list with at least three choices.
-
Initialize this element with any data for it in the query string.
-
Add a checkbox group or a multiple selection list with at least four choices.
-
Initialize this element with any data for it in the query string.
-
Validate that at least one choice is chosen.
-
Validate that not all of the choices are chosen.
-
There is a Hibernate attribute that can test the length of a property that
is an array.
@Size(min=m, max=n)
-
Using the style sheet:
-
If there are any errors, display them in a larger font and in an attention
grabbing color.
-
Change the backgound color of text elements.
-
Change the foreground color of text elements.
-
Change the font of text elements.
-
For the confirm page:
-
Display all the form data in a table, with each property in its own TD element.
-
For the multiple valued property, display all of its values as an ordered
list inside its TD element.
-
Have at least two rows and two columns in the table.
-
Have a heading in the table that spans all the columns.
-
Using the style sheet:
-
Change the background color of the TD elements.
-
Change the foreground color of the TD elements.
-
Change the background color of the TD element that has the ordered list to
a different color than for default TD elements.
-
Change the foreground color of the TD element that has the ordered list to
a different color than for default TD elements.
-
For the process page:
-
Display all the data in the database in nested ordered lists.
-
The top level element should be the business key.
-
The second level elements should be the remaining fields.
-
The third level elements will be the values for the multilple valued property.
-
Using the style sheet, define a unique numbering for all three levels.
-
For a POST request
-
If there is a value in the query string for the business key, then search
the database for the value of that key
-
If the data is in the database, then retrieve that bean and clear the
collections, and clear all properties that use arrays.
-
Use this bean and populate it with the values that are in the query string.
By using the bean from the database, this will ensure that there is only
one record in the database that has this value for the business key.
-
If there is no value for the business key in the query string, then create
a new bean and populate it with the values from the query string.
-
When the data is written to the database, set a cookie for the business key
with its current value. The cookie should expire in one minute.
-
For a GET request
-
If there is a cookie for the business key, then search the database for the
value of the cookie.
-
If the data is in the database, then use the bean from the database to initialize
the form.
-
If the data is not in the database, then create a new bean and populate it
with the values from the query string.
-
If there is not a cookie for the business key
-
If there is a value in the query string for the business key, then search
the database for the value of that key
-
If the data is in the database, then retrieve that bean and clear the
collections, and clear all properties that use arrays.
-
Use this bean and populate it with the values that are in the query string.
By using the bean from the database, this will ensure that there is only
one record in the database that has this value for the business key.
-
If there is no value for the business key in the query string, then create
a new bean and populate it with the values from the query string.
-
Add a cgs4825.jsp file to the hw5 directory.
-
Add a link to the controller.
-
Add another link to the controller that has a query string for your business
key and a value that is in the database.
-
Add another link to the controller that has a query string for your business
key and another value that is in the database.