CGS4854 Assignment 1

Due Tuesday, 9/16 at 12 noon.

To hand in the assignment, zip your cgs4854 directory and upload it via the web: Submitting homework on-line via the Web.

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.

You are to create a service oriented web site. You will be adding features throughout the semester. Users will be able to log into your site and maintain an account on your site. The type of service that you provide is your choice. For example, the site that was developed in the book kept track of a user's hobby and aversion. Try to be creative in picking your site. There are already enough book sellers on the web and one site that keeps track of hobbies is enough. Choose a service that interests you.

Create a Web Application using NetBeans

  1. Create a new web application in NetBeans, named your-username (replace your-username with your user name).
    1. Use the secure web.xml file.
    2. Edit the tomcat users file so that you can access your app.
    3. Create a welcome page named index.jsp. Be sure it uses the strict DOCTYPE.
    4. Validate the JSP at http://www.w3c.org.
    5. Restrict access to this web site to you and me (this is controlled by the secure web.xml file)
  2. Create a JSP similar to InitialisedForm.jsp. Instead of the Hobby property that is used in the book, use two properties of your choice. These properties should be useful in the web site that you are developing. Do not use first name and last name. Be creative. Think of a web site that you would like to create and pick two properties that are specific to that type of service.
  3. Validate the JSP at http://www.w3c.org.
  4. In the index.jsp page, add a relative hypertext link to your JSP.

Configure the Tomcat server

  1. Create and validate your webapps folder on ocelot and request your student host.
  2. Access the Tomcat server by using the student host that I send you:
    http://student99.cgs4854.cs.fiu.edu:8008/
  3. Access the manager application through the student host that I send you:
    http://student99.cgs4854.cs.fiu.edu:8008/manager/html

Deploy the Web Application

  1. In NetBeans, select Clean and Build to recreate all the files in your web application. This will also create the WAR file for the web application.
  2. Connect to ocelot.aul.fiu.edu using winscp. Your username is your panther mail and the password is first initial, followed by panther id, followed by last initial.
  3. Navigate to the cgs4854 directory on ocelot.
  4. Navigate to the directory on your local machine that contains your NetBeans project, then open the dist folder.
  5. Copy the WAR file from your local machine to the cgs4854 directory on ocelot. Do not copy the WAR file to the webapps folder.
  6. Right click the name of the WAR file in the remote window of winscp. Select Custom Commands and then Run. If the name of the war file is MyApp.war, then enter the following command into the command box and hit enter. Replace your-user-name with your user name.
    unzip -o MyApp.war -d webapps/your-user-name

Modify index.jsp in the ROOT Web Application

  1. In winscp, navigate to the cgs4854/webapps/ROOT folder.
  2. Create a file named index.jsp.
  3. Enter all the HTML tags for a standard page.
  4. Use the strict DOCTYPE.
  5. Validate the page at http://www.w3c.org.
  6. Add a relative hypertext link to your username web application. Remember that /on Tomcat means webapps/ROOT in the file system and /username means webapps/username in the file system.
  7. Add a relative hypertext link to the manager application. The absolute link to the manager is
    http://student99.cgs4854.cs.fiu.edu:8008/manager/html

Access the Web Application

  1. You should now be able to access the ROOT web application with
    http://student99.cgs4854.cs.fiu.edu:8008/
  2. From this page, you should have a link to the root of your username web application.
  3. After clicking the link, you should have a link to the JSP for this assignment.
  4. You can also access the manager with
    http://student99.cgs4854.cs.fiu.edu:8008/manager/html
  5. Try stopping the username web application, then try to access the application from the web. You will receive an error.
  6. Next, try starting the username web application, then try to access the application from the web. You should now have access.