The HTTP Status Line
A minimal server response to a client request might be:
HTTP/1.1 200 OK
Content-Type: text/plain
Hello World!
We already saw how to set the content type explicitly using setContentType().
Here we are more interested in the first header line: the status line.
As the example suggests, a status value of 200 means the request was successfully serviced. For a servlet response, the Web server sets this status value by default.
A servlet can explicitly set other values by using the setStatus() method of HttpResponse.