CGS4825 Assignment 1

Due Monday, 9/18 at 11:59 pm.

To hand in the assignment, zip your cgs4825 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.

Configure the Tomcat server

  1. Create and validate your webapps folder on ocelot and request your student host.
  2. Create a file named cgs4825.jsp in the document root of your Tomcat server. Add all the codes for a basic web page, including the DOCTYPE and meta tags.
  3. Validate the cgs4825.jsp page.
  4. When a directory is requested from the web server, the server will look for a default page to display from the directory. Typically, this page is named index.html. Configure your Tomcat server so that the default page is named cgs4825.jsp.
  5. Create a subdirectory named errors in the document root of the Tomcat server.
  6. When a restricted page or a page that does not exist is requested from the Tomcat server, a reponse code of 404 is returned to the browser along with a default page that describes the error. Configure the Tomcat server so that your own custom error page is returned for a 404 error. Place your custom page in the errors directory.
  7. Test that your error page works by creating two hypertext links in the cgs4825.jsp page
    1. Create a hypertext link to a file that does not exist.
    2. Create a hypertext link to a file that the server cannot read. You may create a new file in the docment root and change its permissions appropriately.
  8. Access the Tomcat server by using the student host that I send you:
    http://student99.cgs4825.cs.fiu.edu:8008/

Configure the Apache web server.

  1. Request the port number for your Apache server.
  2. Set up your Apache server on ocelot.
  3. Change the server name from ocelot.aul.fiu.edu to your student host: student99.cgs8425.cs.fiu.edu
  4. Create a file named cgs4825.html in the document root of your Apache server. Add all the codes for a basic web page, including the DOCTYPE and meta tags.
  5. Validate the cgs4825.html page.
  6. When a directory is requested from the web server, the server will look for a default page to display from the directory. Typically, this page is named index.html. Configure your Apache server so that the default page is named cgs4825.html.
  7. Create a directory named errors in your docRoot directory.
  8. When a page that does not exist is requested from the Apache server, a reponse code of 404 is returned to the browser along with a default page that describes the error. Configure the Apache server so that your own custom error page is returned for a 404 error. Place your custom page in the errors directory.
  9. When a restricted page is requested from the Apache server, a reponse code of 403 is returned to the browser along with a default page that describes the error. Configure the Apache server so that your own custom error page is returned for a 403 error. Place your custom page in the errors directory.
  10. Test that your error pages work by creating two hypertext links in the cgs4825.html page
    1. Create a hypertext link to a file that does not exist.
    2. Create a hypertext link to a file that the server cannot read. You may create a new file in the docment root and change its permissions appropriately.
  11. Access your Apache server using the port that you requested and your student host number:
    http://student99.cgs4825.cs.fiu.edu:99999/

Add links to each page to the other server.

  1. Add a hypertext link from cgs4825.html to the Tomcat server root directory.
  2. Add a hypertext link from cgs4825.jsp to the Apache server root directory.