O'Reilly logo

Servlet & JSP: A Tutorial, Second Edition by Budi Kurniawan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 4

JavaServer Pages

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required