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 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.