Wizard API updated!
Tim Boudreau has released a new version of the Swing Wizard library (version 0.997) that fixes the WizardException bug reported in JavaWorld's recent Open Source Java Project profile. The article's examples have been reworked to test out the new, improved WizardException. Thanks, Tim, for this helpful fix!
Open Source Java Projects: The Wizard API

Newsletter sign-up

Sign up for our technology specific newsletters.

Enterprise Java
View all newsletters

Email Address:

Java servlet books: A comparative review

Find out where you can get the best servlet coverage

Lately, I'm often asked which books on Java servlet and JavaServer Pages (JSP) I would recommend. In fact, even when I was at a local bookstore recently someone asked me that. This month, I'll review five books that focus completely on servlets and four others that contain strong servlet content.

The five books with servlet-only content in this review are:

  • Java Servlet Programming, by Jason Hunter with William Crawford
  • Developing Java Servlets, by James Goodwill
  • Inside Servlets: Server-Side Programming for the Java Platform, by Dustin R. Callaway
  • Java Servlets by Example, by Alan R. Williamson
  • Java Servlets, Second Edition, by Karl Moss


Table 1 below provides a quick review of the main characteristics of these servlet-specific books.

Table 1. Servlet-specific books overview
  Java Servlet Programming Developing Java Servlets Inside Servlets Java Servlets by Example Java Servlets
Publisher O'Reilly Sams Addison Wesley Manning McGraw Hill
Price 2.95 9.99 9.95 9.95 9.99
Total Pages
510
515
434
548
514
CD-ROM/Source from FTP site No / Yes No / No Yes / No No / No Yes / Yes
Servlets/JSP Versions covered 2.0 / 0.91 2.1* / 0.92 2.1 / No 2.1 / No 2.1 / No
Sessions Good Good Good Average Very Good
Security Good Average None None Average
XML None None None None None
JDBC Good Very Good Poor Average Good
Internationalization Very Good None None None None
API Reference Yes (AD) Yes (AD) Yes (D) Yes (AdE) Yes (Ad)
Web Servers JWS 1.1 JWS 1.1, JRun JWS 1.1, JRun, ServletExec JWS 1.1, JRun, ServletExec JWS 1.1


The following list explains the meaning of the last several rows in this table. The first group of rows, up to "CD-ROM/Source from FTP site," should be fairly self-explanatory.

  • Servlets/JSP Versions: Indicates the latest versions of the APIs the book covers. The Servlets API versions include 1.0, 2.0, 2.1, and the latest, 2.2. The JSP API versions include 0.91 (and earlier), 0.92, 1.0, and the current 1.1 version.
  • Sessions: Indicates the book's level of coverage on session management, cookies (the cookie class was added to the 2.0 API), as well as state management.
  • Security: Indicates the book's level of coverage on such security topics as HTTP authentication and SSL with servlets.
  • XML: Indicates the book's level of coverage on using the Extensible Markup Language (XML) with servlets.
  • JDBC: Indicates the book's level of JDBC-servlet connectivity coverage, such as access and connection pooling
  • Internationalization: Shows the coverage level for creating Websites that display localized output through servlets, such as date/message formatting, special character set encodings, and use of property files.
  • API Reference: Shows whether or not the book includes the complete javax.servlet API documentation. An (A) indicates the reference is included in the appendix. A (D) indicates the reference includes long descriptions, and a (d) indicates short descriptions. An (E) indicates the use of examples within the API reference.
  • Web Servers: Lists the specific Web servers given a reasonable level of coverage in the book; basically, coverage on how to add a servlet to the Web server is necessary to receive a rating higher than None.


The ranking scale for these topics is None, Poor, Average, Good, Very Good. An asterisk (*) in a field means the review of the specific book provides further details of the ranking.

In addition to the five server-specific books, I reviewed four other books that contain strong servlet content:

  • Professional Java Server Programming, by Andrew Patzer et al.
  • Professional Java XML Programming with Servlets and JSP, by Alexander Nakhimovsky and Tom Myers
  • The Developer's Guide to the Java Web Server: Building Effective and Scalable Server-Side Applications, by Dan Woods, Larne Pekowsky, and Tom Snee
  • Core Java Web Server, by Chris Taylor and Tim Kimmet


Table 2 provides a quick review of these books. The table listings are the same as in Table 1 so that the books can be compared. However, you might not want to read these books for the same purpose as those in the previous group.

Table 2. Non-servlet-specific books overview
  Professional Java Server Programming Professional Java XML Programming Developer's Guide to JWS Core Java Web Server
Publisher Wrox Wrox Addison Wesley Prentice Hall
Price 9.99 9.99 4.95 9.99
Total Pages
1121
772
577
593
CD-ROM/Source from FTP site No / Yes No / Yes Yes / No Yes / No
Servlets/JSP Versions 2.1 / 1.0 2.1 / 1.0 2.1 / 1.0 2.1 / 1.0
Sessions Average Poor Average Good
Security None* None None* Very Good
XML Good Very Good++ None Average
JDBC Very Good Average Good None
Internationalization Average None Average None
API Reference Yes (Ad) Yes (A) No No
Web Servers JRun, JWS 2.0, JServ JSWDK, JRun JWS 1.1 JWS 1.1


In the rest of this article, I'll review each book individually. Beside each book's title is a star rating, which is based on the book's overall coverage of servlets. One star is equivalent to a poor rating, and the highest rating (five stars) translates to exceptional coverage of servlets. Most of the books fall in the middle somewhere, and I'll explain why in this next section. I also gave two of the books -- Professional Java XML Programming with Servlets and JSP and Java Servlets by Example -- an N/A rating because I felt it wasn't fair to compare them to other books that concentrated more on teaching servlets. However, for the subjects they do cover, I would give them both four stars.

Book 1: Java Servlet Programming (5 stars)

O'Reilly's Java Servlet Programming, by Jason Hunter, is probably the most popular programming book on Java servlets. What makes this book so good is its breadth of content. If you already know Java and wish to use it to convert your CGI programs or create new ones, this book will put you well on your way to becoming a sought-after Java servlet developer.



In the first half of the book, Hunter lays a good foundation, explaining what servlets are, why they are better than CGI scripts, and how to get started using them. You'll get a basic Hello World servlet program and an overview of the servlet life cycle. You also learn ways to retrieve information about a server, client, or request. Hunter then covers sending HTML and multimedia content responses, including compressed and multipart responses, using Jef Poskanzer's freely available GIF Encoder. (See the Resources section below for more information on the latter.)

1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |  Next >
Resources