CGS4825 Assignment 2
Due Tuesday, 5/20 at 6 am.
Servlet Controller
Modify the web application that you 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 own fields from Assignment 1.
-
Add appropriate paragraphs, for your application, to the edit, confirm and
process pages.
-
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 your 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.
-
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 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
In the index.jsp page in the ROOT of your Tomcat host, add a hypertext to
the manager application. User a relative reference to manager/html.
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 ~/cgs4825/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.
After uploading, do not modify your files on ocelot until after your assignment
has been graded.