HTTPAsk Server

Job ID: 36033309

Budget: $10 – $30 USD

implement web server – HTTPAsk. This is a web server that uses the client calss that already implemented. When you send an HTTP request to HTTPAsk, you provide the parameters for TCPClient as parameters in the HTTP request.
When HTTPAsk receives the HTTP request, it will call the method TCPClient.askServer(), and return the output as an HTTP response. This may seem confusing, but it is really very simple: instead of running TCPAsk from the command line, you will build a web server that runs TCPAsk for you, and presents the result as a web page (in an HTTP response).


The Job is:

Your job is to implement a class called HTTPAsk. It's "main" method implements the server. It takes one argument: the port number. So if you want your server to run on port 8888, you would start it in the following way:

$ java HTTPAsk 8888
You will be provided with a file with a template for the HTTPAsk class. There is not much content in it though, but your task is to fill in the missing Java code in this file.

Since HTTPAsk is a TCP server, you should implement it in the same way as other servers: it should run in an infinite loop, and when one client has been served, the server should be prepared to take care of the next. Your server does not need to serve more than one client at a time, though. It does not need to be multi-threaded, in other words (that's for later).

The detailed information will be sended later