There are two drawbacks associated with servlets. 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.3.
JSP can be written in standard syntax or XML syntax. JSP pages written in XML syntax are called JSP documents. JSP in XML syntax is very rarely ...