CGS4825 Assignment 5
Due Wednesday, 11/22 at 11:59 pm.
To hand in the assignment, zip your webapps directory and upload
it from ocelot.
-
Please use the following command to compress your webapps folder.
Change to your cgs4825 directory on ocelot and issue the command
zip -r username webapps -x \*.jar \*.zip \*.war \*.log
Replacing username with your user name.
-
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.
Be sure that all your files and subdirectories are included in the zip
file.
After uploading, do not modify your files on ocelot until after your assignment
has been graded.
If you attempted HW4, but were unable to complete it, see me for help.
jdbc:mysql://ocelot.aul.fiu.edu:3306/fall06_username
Adding JAR Files
For this assignment, you must add JAR files to your web application. You
may develop your assignment on ocelot or you may use NetBeans.
If you are developing on ocelot, then you need to copy the JAR files from
my directory to your lib directory.
-
Change to the lib directory of your web application.
-
Issue the command
unzip ~downeyt/cs/public_html/cgs4825/smaller.jar.zip
-
Modify the .cshrc file and include a CLASSPATH statement for each JAR that
is in the lib directory of your web application. You may add them by hand
as you did in the last assignment or run the following command.
~downeyt/public/bin/addJars.pl book
-
If you do the above commands, then you will have all the jar files that are
needed for all the applications though Chapter 5. The zip file includes the
jars that you added from Chapter 4. In addition, the CLASSPATH variable in
.cshrc has been updated so that you can compile on ocelot.
If you are developing on NetBeans,
-
Download the zip file, from the book site, to your computer.
-
Unzip it.
-
Open NetBeans and right-click on the project name in the Projects tab.
-
Select Properties.
-
Select Libraries.
-
Click the Add Jar/Folder button.
-
Navigate to the directory where the unzipped JAR files are.
-
Select all the JAR files you want to include in the web application.
After you have deployed the WAR file to ocelot, you will need to edit the
.cshrc file and include a CLASSPATH statement for each JAR that is in the
lib directory of your web application. You may add them by hand as you did
in the last assignment or run the following command.
~downeyt/public/bin/addJars.pl book
Post Servlet Controller
Implement the Post Servlet application, from Chapter 5, on ocelot. Place
it in the book web application. Do not change the application in any
way. You are to get it working exactly as I have it working.
-
If you are developing locally in NetBeans, after deploying the WAR file to
oceleot, it will be necessary to change the permissions of the
error.log file on ocelot.
-
On ocelot, change to the WEB-INF/logs folder.
-
Change the permission on error.log to 606
chmod 606 error.log
-
If this is not done, then Tomcat will not be able to write messages to the
log file when the app is run on ocelot.
Persistent Data Controller
Implement the Persistent Data application, from Chapter 5, on ocelot. Place
it in the book web application. Do not change the application in any
way. You are to get it working exactly as I have it working.
-
When implementing the controller, be sure to modify the initialization parameters
for your mySql account.
-
The mySql server and port are
http://ocelot.aul.fiu.edu:3306
-
Your username for mySql is
fall06_username
-
Your password is your panther ID. Before working on your homework, please
log onto mySql and change the password. There are instructions on the class
web page: Change password for
mySql.
Web Application
In the welcome page for the book web application, add links to each controller.