Question: Multi-Threaded Web Server In this assignment you have to write a multi-threaded web server to serve incoming requests from clients in a computer network. Your

 Multi-Threaded Web Server In this assignment you have to write a

multi-threaded web server to serve incoming requests from clients in a computer

Multi-Threaded Web Server In this assignment you have to write a multi-threaded web server to serve incoming requests from clients in a computer network. Your web server will be implemented using two Java source files and one directory/folder which contains your website files. The two source files are: * File No. 1: Webrequest. java * File No. 2: Webserver. java File No. 1 is already implemented but File No. 2 is not implemented and should be implemented as part of your tasks in this assignment. In this assignment we have a simple website which has only one html file. When displayed by a web browser, it should look like the web page shown in Figure-1. Figure-1: Web page stored in the website directory/folder. Assuming an error-prone network, your tasks are: 1. Study the source code written in File No. 1 carefully. 2. Modify the given html file to display your name and registration number. 3. Write a source code for a multi-threaded web server that utilises the source code in File No. 1. This code (i.e., the multi-threaded web server code) should take two arguments from the user: a) Port number. b) Directory/Folder path and name. 4. Save the source code for the multi-threaded web server in File No. 2. 5. Compile File No. 1 and File No. 2 then run File No. 2 in console (terminal). For example, on GNU/Linux operating system the command is: userecomputer: \$ sudo java WebServer port_number/path/to/my/website/folder/ 6. Access the web server from a web browser and observe the web page. 7. Optional: monitor the transport-layer states and events using netstat when you access the web server using more than one tab in your web browser. What happens when there is more than one client request? What states are displayed on console/terminal by netstat? Comment on that. Deliverables: one Java source code (multi-threaded web server source code written in File No. 2)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!