You write a JSP, but it becomes a servlet. The only way to really tell what’s happening is to look at what the Container does to your JSP code. In other words, how does the Container translate your JSP into a servlet?
Once you know where different JSP elements land in the servlet’s class file, you’ll find it much easier to know how to structure your JSP.
The servlet code on this page is not the real code generated by the Container—we simplified it down to the essential parts. The Container-generated servlet file is, well, uglier. The real generated servlet source code is slightly harder to read, but we will look at the real thing in a few pages. For now, though, all we care about is where in the servlet class our JSP code actually ends up.