Chapter 5: Handling the Client Request: HTTP Request Headers
Complete source code for every example from this chapter, available free for unrestricted use.
Live links to all URLs cited in the chapter. More information. To view source code for other chapters in this book, mouse over the table of contents bar on the left.
Source Code from Chapter
Note: right-click or shift-click on the links to download the associated file.
ShowRequestHeaders.java.
Debugging/testing servlet that shows all headers coming in on current request.
LongServlet.java.
Servlet that generates long and simple output. Sends output
gzipped to clients that indicate (with Accept-Encoding
header) that they support it. Uses the
GzipUtilities class.