Chapter 4. Servlet and JavaServer Pages Basics

A JSF-based application runs as a web application in a Java web container. While the Java Servlet API dependencies are limited to a few classes, and a simple JSF application never needs to be exposed to it, the main concepts defined by the Servlet specification must be understood to develop and deploy a JSF application. In addition, JavaServer Pages (JSP) technology—which is based on the Servlet API—is often used as the presentation layer in a JSF application.

This chapter is a brief introduction to the Hypertext Transport Protocol (HTTP), servlets, and JSP, focusing on the areas that are important for a JSF application. This chapter contains the bare minimum you need to know to understand the rest of this book. I recommend that you read books dedicated to the subjects of servlets and JSP before you embark on a real development project. Two books I can recommend are Jason Hunter’s and William Crawford’s Java Servlet Programming (O’Reilly) and my own JavaServer Pages (O’Reilly). If you’re already familiar with these technologies, you can safely skip this chapter.

Get JavaServer Faces 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.