From the course: Java EE 8 Essential Training

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Message handling

Message handling - Java EE Tutorial

From the course: Java EE 8 Essential Training

Start my 1-month free trial

Message handling

- [Instructor] The Servlet interface is designed to receive and respond using HTTP messages. It's important to understand the concepts behind HTTP messages, and their associated API interfaces, to successfully work with Servlets. Within Servlet API, we will be using the HTTP Servlet request, and HTTP Servlet response interfaces when we are working with HTTP messages. These interfaces have corresponding methods that are able to retrieve or create parts of an HTTP request. Let's review the typical structure of an HTTP message in order to work with these interfaces better. An HTTP message begins with a start line that contains the type of HTTP method, in this case a POST, and the protocol being used, HTTP. The start line is followed by headers that provide metadata about the message, and cookies included within the message. Finally, the body of the response contains data associated with the message, which can be a variety of…

Contents