If that’s the response, what’s in the request?

The first thing you’ll find is an HTTP method name. These aren’t Java methods, but the idea is similar. The method name tells the server the kind of request that’s being made, and how the rest of the message will be formatted. The HTTP protocol has several methods, but the ones you’ll use most often are GET and POST.

image with no caption
image with no caption

Get Head First Servlets and JSP, 2nd Edition now with O’Reilly online learning.

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