Appendix B. HTTP Servlet API Quick Reference

The javax.servlet.http package allows development of servlets that support the HTTP protocol. While the core functionality in the javax.servlet package provides everything necessary for web development, the specialized classes in this package automate many otherwise tedious tasks. For example, the abstract HttpServlet class includes support for different HTTP request methods and headers. The HttpServletRequest and HttpServletResponse interfaces allow additional direct interaction with the web server, while HttpSession provides built-in session tracking functionality. The Cookie class allows you to quickly set up and process HTTP cookies, and the HttpUtils class does the same for query strings. Figure 2.1 shows the class hierarchy of the javax.servlet.http package.

The javax.servlet.http package

Figure B-1. The javax.servlet.http package

Get Java Servlet Programming now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.