Chapter 2. Simple JSPs

Chapter 1 presented the case for dynamic sites and surveyed a number of techniques for building such sites, focusing on the strengths of JavaServer Pages technology. With these preliminaries out of the way, everything is in place to start creating some pages! This chapter begins by introducing some of the simpler features of JSPs.

It is a time-honored tradition for computer books to start with an example that allows the system being studied to introduce itself. This book is no exception, so without further delay, Listing 2.1 contains our first JSP.

Example 2.1. Listing 2.1 A simple JSP

<html>
<!-- Our first JavaServer Page -->
<body>
Hello, world!
</body>
</html>

This may look like a plain old chunk of HTML, not a very interesting ...

Get JavaServer Pages™, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.