Chapter 7. GENERATING THE SERVER RESPONSE: HTTP RESPONSE HEADERS

Topics in This Chapter

  • Setting response headers from servlets

  • The purpose of each of the HTTP 1.1 response headers

  • Common MIME types

  • A servlet that uses the Refresh header to repeatedly access ongoing computations

  • Servlets that exploit persistent (keep-alive) HTTP connections

  • Generating GIF images from servlets

A response from a Web server normally consists of a status line, one or more response headers, a blank line, and the document. To get the most out of your servlets, you need to know how to use the status line and response headers effectively, not just how to generate the document.

Setting the HTTP response headers often goes hand in hand with setting the status codes in the status ...

Get Core Servlets and JavaServer Pages™ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.