A2:
| page, pageContext, and out are all instances of classes that are unique to JSPs—they are not defined in the servlet API. As a developer, you will need to be aware of the differences between out, which is a JspWriter, and the Printwriter returned by the getWriter method of a ServletResponse. In essence, you will need to remember that several methods of the JspWriter throw exceptions. Similar methods in a PrintWriter do not. In addition, a JspWriter may provide additional flexibility because of extended buffer control. For example, in spite of the fact that template text may have been buffered to output, you can often still set HTTP header information, because a response has not yet been sent. |