Required to implement a very simple HTTP web server. A web server waits for incoming client connections on a specified port. Once a client connects to the server, the client can issue HTTP requests. Web servers are typically able to service multiple client requests
concurrently using threads.
We have provided a NetBeans project as your starting point. This contains a skeleton
implementation of the web server itself and is bundled with libraries which provide classes for parsing, constructing and querying HTTP messages. You must use the code and libraries provided. You are not permitted to use any other libraries except for the standard Java libraries. Implementations which violate these constraints will be awarded zero marks.
Study the provided Java source file for the WebServer class. You are required to implement your solution by adding code to this class. Your final submission must consist of the single file [url removed, login to view] (it is not necessary to define any additional classes for this project but, if you feel the need, you must define them as nested classes inside WebServer).
The WebServer constructor accepts two arguments:
1. port: an integer; this is the port number on which your server will listen for incoming
2. rootDir: a string; this is the path to a folder on the local file system from which your
server code must fetch files in response to client requests. This path may either be a relative path, interpreted relative to the Java working directory, or an absolute path. In either case, the URI in an HTTP request will be interpreted relative to this path (see Legitimate URI in the HTTP protocol specifications section later in this document).
All the documents are attached within the ZIP file, if you have any question please feel free to ask. I would need this with 20 hours.
I can implement in 20 hours , I have experience of developing OSI network layers. I am senior java developer with experience of 2+ years. Kindly let me know when do you want me to start