Chapter 6. Generating the Server Response: HTTP Status Codes
Topics in This Chapter
Format of the HTTP response
How to set status codes
What the status codes are good for
Shortcut methods for redirection and error pages
A servlet that redirects users to browser-specific pages
A front end to various search engines
As we saw in the previous chapter, a request from a browser or other client consists of an HTTP command (usually
POST), zero or more request headers (one or more in HTTP 1.1, since
Host is required), a blank line, and, only in the case of
POST requests, some query data. A typical request looks like the following.
GET /servlet/SomeName HTTP/1.1 Host: ... Header2: ... ... HeaderN: (Blank Line)
When a Web server responds to a request, the ...