CGS4825 Assignment 2
Due Monday, 2/18 at 11:59 pm.
To hand in the assignment, zip your webapps directory and upload
it via the web:
Submitting
homework on-line via the Web.
-
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 book 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.
~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.
Configure the Tomcat server
-
If you have not already done so, create and validate your webapps folder
on ocelot and request your student host:
Create
webapps on ocelot
-
Access the Tomcat server by using the student host number that I send you
(not 99):
http://student99.cgs4825.cs.fiu.edu:8008/
-
Access the manager application through the student host that I send you:
http://student99.cgs4825.cs.fiu.edu:8008/manager/html
Servlet Controller
Use NetBeans to create a new web application named book:
Netbeans Information
-
Download all the necessary files for the Servlet Controller from Chapter
2 and get it working in your web app in NetBeans. Create the correct
subdirectories in the Web Pages folder, for the JSP files.
-
Get the servlet controller working as it is on the web site. Do not change
its package. You will need to create the corresponding package in the Source
Packages folder of the project.
-
Create a servlet definition and mapping, for the servlet controller, in the
web.xml file: Servlet Mapping
-
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 user's hobby, but will not allow the
user to edit it.
-
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 an index.jsp page to the web application. This should be the default
page that appears when the web application is accessed without a file name.
Add a hypertext link to the 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
Add a welcome page, named index.jsp, to the ROOT web application on ocelot.
You may create this file on ocelot or you may create it locally and upload
it to ocelot.
-
Name the file index.jsp.
-
Place your name and username in the page.
-
Add a hypertext link to the book web application that you just created. Use
a relative link. Do not include a filename in the link, only include a path.
The page that should appear is the index.jsp file of the web application.
-
Add a hypertext to the manager application. User a relative reference to
manager/html.