Murach's Java Servlets and JSP (2nd Edition)
How to work with HTTP requests and responses

This chapter introduces the HTTP protocol and surveys some of the methods of the servlet API that you can use to work with the HTTP headers and status codes of HTTP requests and responses.

Chapter 18 How to work with HTTP requests and responses
An introduction to HTTP 556
An HTTP request and response 556
Common MIME types 558
Common HTTP request headers 560
Common HTTP status codes 562
Common HTTP response headers 564
How to work with the request 566
How to get a request header 566
How to display all request headers 568
How to work with the response 572
How to set status codes 572
How to set response headers 572
Practical skills for working with HTTP 574
How to return a tab-delimited file as an Excel spreadsheet 574
How to control caching 574
How to compress a response with GZIP 576
How to display the File Download dialog box 578
t




Murach's Java Servlets and JSP

Learn more about this book

View the table of contents

Add this book to your cart