A.1. Overview of Servlets and JavaServer Pages

Advantages of Servlets

  • Efficient: threads instead of OS processes, one servlet copy, persistence

  • Convenient: lots of high-level utilities

  • Powerful: talking to server, sharing data, pooling, persistence

  • Portable: run on virtually all operating systems and servers

  • Secure: no shell escapes, no buffer overflows

  • Inexpensive: inexpensive plug-ins if servlet support not bundled

Advantages of JSP

  • Versus ASP: better language for dynamic part, portable

  • Versus PHP: better language for dynamic part

  • Versus pure servlets: more convenient to create HTML

  • Versus SSI: much more flexible and powerful

  • Versus JavaScript: server-side, richer language

  • Versus static HTML: dynamic features

Free Servlet and JSP Software

Get Core Servlets and JavaServer 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.