CGS4854 Assignment 2
Due Tuesday, 9/30 at 12 noon.
Servlet Controller
Modify the username web application that you created for Assignment 1.
-
Do not modify the JSP with the form that was created for Assignment 1.
-
Implement a servlet controller for your application. The controller should
behave like the servlet controller from Chapter 2 of the book.
-
Instead of using my field of hobby, use your two fields from Assignment 1.
-
Add appropriate paragraphs, for your application, to the edit, confirm and
process pages. These paragraphs should contain descriptions of each page.
If you do not have good paragraphs, you will lost points on the assignment.
-
Create another JSP that will also display the data that is sent to it.
-
Name the page WishList.jsp.
-
The wish list page will display the data from the fields that are sent to
it, but will not let the user edit them. Eventually, this is a page where
users will be able to store information, without purchasing it. Please add
an appropriate description to this page for your web application. If you
do not have a good description, then you will lose points.
-
Add buttons to the wish list page that can send the user's data back to the
edit page or to the confirm page.
-
Add a button to the confirm page that can send the user's data to the wish
list page.
-
Add a hypertext link in the index.jsp page of the username web app
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
If you did not do so in Assignment 1, then in the index.jsp of the ROOT web
app, add a hypertext to the manager application. Use a relative reference
to manager/html.
If you did not do so in Assignment 1, then in the index.jsp of the ROOT web
app, add a hypertext to the root of the username web application. Use a relative
reference to the web app root.
Hand In Assignment
To hand in the assignment, zip your webapps directory and upload
it via ocelot.
-
Please use the following command to compress your webapps folder.
Log into ocelot and issue the command
zip -r username ~/cgs4854/webapps -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.
-
Use my uploading program from ocelot to upload the file. Enter this command
at the command prompt:
~downeyt/cs/public/webftp/webftp.pl
-
Upload the username.zip file as binary.
Be sure that all your files and subdirectories are included in the zip
file.
Be sure that the .java files have been deployed to ocelot.
After uploading, do not modify your files on ocelot until after your assignment
has been graded.