CGS4825 Assignment 4
Due Friday, 4/7 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 \*.gif \*.jpg access\*
error\*
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.
Modify Your Apache Server
-
Create a directory in the document root named styles.
-
Restrict acces to this directory in
access.conf
-
Only allow yourself and me to access your site.
-
Use my password file to check for valid users.
/aul/homes/downeyt/cs/etc/06s/registered.passwd
-
Create a style sheet in this directory.
-
Change the default font and font size. You must select at least one specific
font, and there must be a final choice which is a generic font family.
-
Change the default background color.
-
Change the default foreground color.
-
Change the default right and left margins.
-
Change the width of horizontal rules to 75%.
-
Define the numbering for nested ordered lists.
-
If there is an ordered list within an ordered list, then it should use a
different ordering.
-
Use
www.w3.org
to validate your style sheet.
-
Create a directory in the document root named hw4.
-
Restrict acces to this directory in
access.conf
-
Only allow yourself and me to access your site.
-
Use my password file to check for valid users.
/aul/homes/downeyt/cs/etc/06s/registered.passwd
-
Turn on language negotiation in this directory. Create three versions of
cgs4825.shtml for this directory.
-
One for English
-
One for Spanish
-
One for French
-
Each page should use the style sheet.
-
Add a hypertext link in each page to the document root of the username web
application.
-
Inlcude the Apache header and footer files in each page.
-
Validate each page for correct HTML. Be sure to use this DOCTYPE
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
-
Include the following meta tag in each page so that the page does not get
stuck in the cache.
<meta http-equiv="Pragma" content="no-cache">
-
Do not leave your Apache server running. Start it when you want to work on
it, shut it down when you are not working on it.
Add jar files to your lib directory
-
Change to the WEB-INF directory of the username web application.
-
Rename the lib directory in your username web application to something
other than lib.
-
Create a symbolic link to my lib directory.
ln -s ~downeyt/cgs4825/webapps/downeyt/WEB-INF/lib
-
Edit the .cshrc file. If you use pico, be sure to use the -w switch as
pico -w
.
-
Remove the CLASSPATH statements that add .jar files from the lib directory.
-
Do not delete any other CLASSPATH statements.
-
Run my script that will add CLASSPATH statemtents for all the jar files in
the lib dir. Only run this command
once.
~downeyt/public/bin/addJars.pl >> ~/.cshrc
Create a new Controller servlet that is similar to the Controller servlet
from HW3.
-
Create the controller in the hw4 package.
-
Map the controller to /hw4/Controller.
-
Place the JSP files for the controller in a directory named hw4 in
the root of the username web application.
-
Create a symbolic link in the document root of your Tomcat host to the
styles directory in Apache.
-
Create a symbolic link in the root of the username web application to the
styles symbolic link in the document root of your Tomcat host.
-
In the cgs4825.jsp file in the root of the username web application, add
a hypertext link to the hw4 directory.
-
Create a cgs4825.jsp file in the hw4 directory.
-
Add a hypertext link to the hw4 controller.
-
Use the Apache stylesheet.
-
Include the Apache header and footer files.
-
Each JSP should use your Apache style sheet. This means all cgs4825.jsp files,
all error files, and all JSPs controlled by the hw4 controller.
-
Each JSP should include the Apache header and footer files. This means all
cgs4825.jsp files, all error files, and all JSPs controlled by the hw4
controller.
-
The JSPs for the controller should have at least three fields, and there
must be edit, confirm, save, and process pages.
-
Each form should use the POST method.
-
If the user makes a GET request, then the only page that should appear is
the edit page, regardless of the values in the query string.
-
One of the fields in your JSPs must be able to uniquely identify the user.
If you have not already done this, then rename one of your fields so that
it represents a field that will contain a unique value for the user. Do not
use zip code, social security number, nor ocelot username.
-
Use a Hibernate annotation with a regular expression to validate the unique
field when the user clicks the confirm button.
-
If the unique field is not valid, then display the edit page again, with
the form elements initialized with the user's data, and display an error
message explaining what the error was.
-
If the unique field is valid, then continue to the confirm page.
-
The validation must be non-trivial.
-
When the user clicks the process button, write the user's data to your mysql
database using Hibernate.
-
You must be set the connection URL to use mysql on ocelot
jdbc:mysql://ocelot.aul.fiu.edu:3306/spr06_username
-
The username for mysql on ocelot is
spr06_username
-
The initial password is you panther id. Please log into mysql and change
your password. Follow the steps from the class page:
mySql commands.
-
Display all the current data from the database in the process page.
-
Send all the data to the JSP as a collection of beans. This should be sent
to the JSP by setting an attribute.
-
Loop through the data and present it in nested ordered lists.
-
The top level list will contain the unique field.
-
For each of these fields, create a nested ordered list that has all the other
data for this user.