You learned in Appendix B, “Servlets” that there are two drawbacks servlets are not capable of overcoming. First, all HTML tags written in a servlet must be enclosed in Java strings, making sending HTTP response a tedious effort. Second, all text and HTML tags are hardcoded; as such, even minor changes to the presentation layer, such as changing a background color, require recompilation.
JavaServer Pages (JSP) solves the two problems in servlets. JSP does not replace Servlet, though. Rather, it complements it. Modern Java web applications use both servlets and JSP pages. The latest version of JSP at the time of writing is 2.2.
This appendix starts with an overview of JSP and discusses in detail comments in JSP ...