CGS4825 Assignment 3
Due Thursday, 5/29 at 6 am.
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.
-
Place all your .java files in a package. Never use the default package.
-
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.
-
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.
-
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.
-
If yo have not already done so, 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 cgs4825 directory and upload it.
-
Please use the following command to compress your cgs4825 folder.
zip -r username ~/cgs4825 -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.