Edit Edit

Java Servlet FAQ


What is the structure of the HTTP response?


The response can have 3 parts:

1) Status Code - describes the status of the response. For example, it could indicate that the request was successful, or that the request failed because the resource was not available. If your servlet does not return a status code, the success status code, HttpServletResponse.SC_OK, is returned by default.

2) HTTP Headers - contains more information about the response. For example, the header could specify the method used to compress the response body.

3) Body - contents of the response. The body could contain HTML code, an image, etc.



Last updated 12/24/1999 06:00:00 PM