CGS4825, Assignment 5
Due Thursday 4/20 at 6:00 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.
-
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 the correct action statement to the form so that the query string data
is not sent to the controller.
-
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.
-
If you added a radio group above, then add a multiple selection list.
If you added a single selection list above, then add a checkbox group.
-
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:
-
Add the correct action statement to the form so that the query string data
is not sent to the controller.
-
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:
-
Add the correct action statement to the form so that the query string data
is not sent to the controller.
-
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 the save page:
-
Add the correct action statement to the form so that the query string data
is not sent to the controller.
-
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. In other words,
after retrieving the data from the DB, clear the collections in the bean and set all arrays
for any multiple valued properties to null.
-
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.
- For all cases, populate the bean 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 retrieve that bean.
-
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 wasn't a bean in the database for the business key in the cookie, then test
if there is a business key in the query string.
-
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.
-
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 was no bean in the database for the cookie or the query string then create a new bean.
- For all cases, populate the bean with the values from the query string.
-
Add a cgs4825.jsp file to the hw5 directory.
-
Add a hypertext link to the controller.
-
Add another hypertext link to the controller that has a query string for
your business key and a value that is in the database.
-
Add another hypertext link to the controller that has a query string for
your business key and another value that is in the database.
-
In the cgs4825.jsp in the username web application, add a hypertext link
to the hw5 directory.