Skip to main content

CIS 371

Simple Web Server

Fall 2022

GitHub Classroom URL: https://classroom.github.com/a/oOJalnsw
This video demonstrates how to use GitHub Classroom with this assignment.

Objective

Learn the inner workings of a basic web server to better understand what underlies web platforms. In particular, students will observe the details of

Details

Your web server must:

Challenges

  1. Make your server multi-threaded so that it can serve multiple requests at once.
  2. Implement an HTTPS server. Warning: I hear that getting the certificates set up correctly can be challenging. I've never done this; so, if you run into trouble, I'll be of limited help.

Rules

Submission and Grading

This project will be partially auto-tested using GitHub Actions. Begin by using following this link to create a repository for this project. Once you have created your repository for this assignment, clone the repo to your local machine. Your repository will contain the following files:

MyStaticWebServer.java
This file contains some code to help you get started (including most of the code from the sample server we discussed in class). You don't have to use this file, or any of the code in it. But, if you choose a different file, you will have to adjust the Makefile accordingly so that GitHub can build and run your server. (I'm happy to help you do this.)
Makefile
GitHub will use this file to build, run, and test your server. If you put all your code into MyStaticWebServer.java, you won't need to modify this makefile. However, if you have a different design in mind, go ahead. I'm happy to help you adjust the makefile as necessary.
.github
Configuration files for GitHub Actions. Don't mess with files here. (Attempting to modify the testing process to either (1) create a "false pass", or (2) examine the test cases is a serious violation of the CIS Academic Honesty Policy.)
studentData
This directory contains files you can use to test your server. To launch your server with this directory as the root,
  1. cd into this directory
  2. Run java -cp .. MyStaticWebServer
testPlan.txt
Complete this document to specify how you will test your server.

Steps for completion and submission

  1. Begin by writing your test cases. Look through the requirements above, and write a short paragraph describing how you will verify that your server meets each requirement. (testPlan.txt includes a couple samples.)
  2. Write your code. Make sure your name appears in all files.
  3. When your code passes all of your tests, push to the master branch.
  4. Go to the Actions tab on the GitHub page for this project and launch the tests.
  5. If your code fails my tests:
    • Figure out what is missing from your test plan and add it.
    • Fix your code
    • Resubmit.
    Your test plan should indicate which tests were added in response to failing CI builds. (If you have many failing CI builds, but no additional tests cases, I'll know you didn't follow the testing procedure.)
  6. When your code passes the GitHub tests, schedule a demo with me.

Hints and Reminders


Updated Tuesday, 6 September 2022, 12:57 PM

W3c Validation