The formats of HTTP requests and HTTP responses are similar, and both have the following structure:
Start with status line + CRLF (carriage return and line feed)
Zero or multiple line header module + CRLF
A blank line, such as CRLF
Optional message body such as file, query data, query output
JSP HTTP status code syntax
The formats of HTTP requests and HTTP responses are similar, and both have the following structure:
Start with status line + CRLF (carriage return and line feed)
Zero or multiple line header module + CRLF
A blank line, such as CRLF
Optional message body such as file, query data, query output
JSP HTTP status code example
HTTP/1.1 200 OKContent-Type: text/htmlHeader2: ......HeaderN: ... (Blank Line) <!doctype ...> <html> <head>...</head> <body>...</body> </html>