June 2004
Intermediate to advanced
848 pages
21h 28m
English
Tomcat will also pass your servlet one of these response objects as an argument. The object has lots of methods that let you give values to its fields. You send back the actual data by writing to a print writer that you get from the response object.
Table 26-5 shows the most frequently called methods of your response object, the HTTP servlet response.
You will invoke these methods on the javax.servlet.http.HttpServletResponse parameter, as shown in the example coming up. There are about 20 methods in HttpServletResponse and its parent class, ServletResponse, allowing just about any field to be set and returned to the browser. There are about 20 static final variables giving names to each of the status codes. ...
Read now
Unlock full access