Description
CS4445 Project 1 (Due: 09/21/2018)
In this project, you will write a simple HTTP server (in Java) that serves web browsers as its clients. Once your program starts, it opens a http server socket with port number 9000 and waits for any client connection. After the server starts, it displays (on server side screen) server’s ip address, port number and the message that shows the server has started successfully. To complete the project, you have to implement “HttpHandler” interface and the messages between http server and client are exchanged by using “HttpExchange” class.
To implement the server, you can simply use high-level Java http server API (com.sun.net.httpserver package). Please refer to Java Doc from Oracle.
When the client connects to your server, your server will send a message back to the client, saying that the server is running without any problem along with HTTP status code 200. To connect to the server from the web browser, you will use “server ip address:port number” in the address bar to request a connection.
Submissions You must submit the program that compiles and runs without any error to receive full points. Don’t forget to put comments in your source code so that the reader can understand your program easily. On the top of each source code file, please don’t forget to put your Name. You will submit the project to Canvas.
Unformatted Attachment Preview
Purchase answer to see full attachment