CGS4825 Assignment 4

Due Monday, 3/26 at 11:59 pm.

To hand in the assignment, zip your webapps directory and upload it from ocelot.

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 HW3, but were unable to complete it, see me for help.

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.

  1. Change to the lib directory of your web application.
  2. Issue the command
    cp ~downeyt/cs/public_html/cgs4825/jar/*  ./
  3. Modify the .cshrc file and include a CLASSPATH statement for each the log4j and beanutils JAR files. The other JAR files are never accessed directly by your code, so they do not need to be added to the CLASSPATH. Each command should be on a separate line in .cshrc. Be sure that each entire command is on one line.
    setenv BOOKLIB {$HOME}/cgs4825/webapps/book/WEB-INF/lib
    setenv CLASSPATH {$CLASSPATH}:{$BOOKLIB}/log4j-1.2.11.jar
    setenv CLASSPATH {$CLASSPATH}:{$BOOKLIB}/commons-beanutils.jar

If you are developing on NetBeans,

  1. Download the JAR files to your computer.
  2. Open NetBeans and right-click on the project name in the Projects tab.
  3. Select Properties.
  4. Select Libraries.
  5. Click the Add Jar/Folder button.
  6. Navigate to the directory where the downloaded JAR files are.
  7. Select all the JAR files you want to include in the web application.
  8. After you have deployed the WAR file to ocelot, you will need to edit the .cshrc file as is described above for ocelot.

Enhanced Controller

Implement the Enhanced application, from Chapter 4, 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.

Modify the Application

Now that the application is working, make the following modifications.