When a Container translates the JSP into a servlet, the beginning of the service method is a pile of implicit object declarations and assignments.
With implicit objects, you can write a JSP knowing that your code is going to be part of a servlet. In other words, you can take advantage of your servletness, even though you’re not directly writing a servlet class yourself.
Think back to Chapter 4, Chapter 5, and Chapter 6. What were some of the important objects you used? How did your servlet get servlet init parameters? How did your servlet get context init parameters? How did your servlet get a session? How did your servlet get the parameters submitted by the client in a form?
These are just a few of the reasons your JSP might need to use some of what’s available to a servlet. All of the implicit objects map to something from the Servlet/JSP API. The request implicit object, for example, is a reference to the HttpServletRequest object passed to the service method by the Container.
Q: What’s the difference between a JspWriter and a PrintWriter I get from an HttpServletResponse?
A: The JspWriter is not in the class hierarchy of PrintWriter, so you can’t use it in place of a PrintWriter. But it has most of the same print methods, except it adds some buffering capabilities.