Chapter 19. Server-Side Java: Servlets

Topics in This Chapter

  • The advantages of servlets over competing technologies

  • Free servlet and JSP engines

  • The basic servlet structure and life cycle

  • Servlet initialization parameters

  • Access to form data

  • HTTP 1.1 request headers, response headers, and status codes

  • The servlet equivalent of the standard CGI variables

  • Compression of pages generated by servlets

  • Cookies in servlets

  • Session tracking

Servlets are java technology's answer to Common Gateway Interface (CGI) programming. They are programs that run on a web server, acting as a middle layer between a request coming from a web browser or other http client and databases or applications on the http server. Their job is to:

  1. Read any data sent by the user. This ...

Get Core Web Programming, Second Edition 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.