CGS4854 Assignment 3
Due Tuesday, 10/14 at noon.
Apache
Start your Apache server.
-
Request a port and start your server.
-
Add JkMount directives to the httpd.conf file for the following.
-
All paths that start with /manager/*
-
All paths that start with /username/*
-
The path /username
-
Remove the JkMount for examples.
-
Add an index.html page to the docRoot directory.
-
Include all the standard tags.
-
Validate the page.
-
Include a relative link to the username web application.
-
Include a relative link to manager/html.
Reorganised Controller
Modify the web application that you created for Assignment 2.
-
If you had any errors in Assignment 2, fix them before you submit Assignment
3.
-
Place all your .java files in a package. Never use the default package.
-
Add a new field to your JSPs that is relevant to the site that you are creating.
-
Use a field that has a reasonable default value.
-
The user will enter data into the field in the Edit page. Fill the input
element with the corresponding data in the query string.
-
Echo the value of the field in the Confirm, Process and WishList pages.
-
Create a bean for the web application.
-
Place it in the same directory as the controller.
-
The bean should have a property for each input field that you have in your
edit JSP.
-
Add default validation for the new field that you have added in this assignment.
You do not need default validation for the fields that were in Assignment
2.
-
Create a controller helper for the web application.
-
Place it in the same directory as the controller.
-
Modify the controller helper so that it can process all four of your pages.
-
Modify the controller helper so that it uses your bean and initializes your
bean.
-
Change the name that is used to store the helper in the session (do not use
"helper"). This will change how you access your data in the JSPs.
-
Place the helper base file in the same directory as the controller. Do not
make any changes to the helper base file.
-
Rewrite the controller so that it uses a controller helper.
-
Place your JSPs in a visible subdirectory. Modify the pages so that
they use the helper in the session to access the bean and its properties.
-
Add a hypertext link in the index.jsp page to the servlet mapping for servlet
controller. Use a relative link.
-
The web app must use the secure web.xml file and should only allow
you and me to access your application:
Edit tomcat users
-
Be sure to modify the project so that the .java files are placed in
the WAR file: Configuring WAR File
-
After the app is running in NetBeans, upload it and run it on ocelot:
Uploading a WAR file
ROOT Web Application
Be sure you have the following links in the ROOT/index.jsp file.
-
Relative link to manager/html.
-
Relative link to the root of your web application.
-
Absolute link to your student host using your Apache port.
Hand In Assignment
To hand in the assignment, zip the cgs4854 directory and upload it.
-
Please use the following command to compress your cgs4854 folder.
zip -r username ~/cgs4854 -x \*.jar \*.zip \*.war
Replacing username with your user name. This will create a file named
username.zip. It contains the ROOT, manager and username web applications.
-
Check the size of the ZIP file, it should be less than 3 MB. If it is not,
then you probably have another ZIP file stored in the ZIP archive. Delete
it and re-zip.
-
You then have a choice for submitting the file.
-
If you are logged onto ocelot, use my uploading program to upload the file.
Enter this command at the command prompt:
~downeyt/cs/public/webftp/webftp.pl
-
If you are using winscp, then download the zip file to your computer; then,
upload the file to me:
Submitting
homework on-line via the Web.
-
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.