Chapter 2. Java Servlets

JavaServer Pages are extensions of Java servlets, therefore, you really need to understand Java servlets before you can fully grasp the JSP architecture. Given the previous statement, servlets are generic extensions to Java-enabled servers. Their most common use is to extend Web servers, providing a very efficient, portable, and easy-to-use replacement for CGI. A servlet is a dynamically loaded module that services requests from a Web server. It runs entirely inside the Java Virtual Machine. Because the servlet is running on the server side, it does not depend on browser compatibility. Figure 2.1 depicts the execution of a Java servlet. In this chapter, you'll learn the basics of working with servlets, and how servlets ...

Get Pure Java Server Pages™ 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.