March 2002
Beginner to intermediate
528 pages
10h 12m
English
The service provided by a servlet is implemented in the service method of a GenericServlet, the doMethod methods (where Method can take the value Get, Delete, Options, Post, Put, Trace) of an HttpServlet,orany other protocol-specific methods defined by a class that implements the Servlet interface. In the rest of this chapter, the term service method will be used for any method in a servlet class that provides a service to a client.
The general pattern for a service method is to extract information from the request, access external resources, and then populate the response based on that information.
For HTTP servlets, the correct procedure for populating the response is to first fill in the response headers, then retrieve ...