Chapter 8. HANDLING COOKIES

Topics in This Chapter

  • Purposes for cookies

  • Problems with cookies

  • The Cookie API

  • A simple servlet that sets cookies

  • A cookie-reporting servlet

  • Some utilities that simplify cookie handling

  • A customized search engine front end based upon cookies

Cookies are small bits of textual information that a Web server sends to a browser and that the browser returns unchanged when later visiting the same Web site or domain. By letting the server read information it sent the client previously, the site can provide visitors with a number of conveniences such as presenting the site the way the visitor previously customized it or letting identifiable visitors in without their having to enter a password. Most browsers avoid caching documents ...

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.