O'Reilly logo

Java 7: A Beginner's Tutorial (Third 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 27

JavaServer Pages

As evidenced in Chapter 26, there are two drawbacks servlets are not capable of overcoming. First, when sending a response, all HTML tags must be enclosed in strings, making sending HTTP response a tedious effort. Second, all text and HTML tags are hardcoded, and, as a result, minor changes to an application presentation part, such as changing a page background color, requires recompilation.

JavaServer Pages (JSP) comes to the rescue and solves the two problems in servlets. JSP does not replace Servlet, however, but complements it. Modern Java Web applications use servlets and JSP pages at the same time. The latest version of JSP at the time of writing is 2.2.

A JSP Overview

A JSP page is essentially a servlet. However, ...

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