Cover Page by Budi Kurniawan

Safari, the world’s most comprehensive technology and business learning platform.

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required

O'Reilly logo

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

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required