Best Java Servlets Book on the Market

Good coverage of all the basics. Falls a bit short of exploring deeper issues of potential interest to developers.


ORIGINAL DRAFT

At the time of this writing, there are two books that I know of that cover Java servlets. This seems unfortunate, given the wide array of applications this recent technology enables. While its simple enough to understand how to use basic servlets, the development community clearly needs a deeper exploration of the issues, methods and solutions available with this approach. For those to whom Java servlets are a relatively new idea, they represent a high-performance alternative to CGI web programs and proprietary server-side scripting.

Java Servlet by Karl Moss provides a great deal of important information for budding servlet developers who need to implement sophisticated web applications in Java. The CD contains the servlet API, source code from the book, a trial version of Borland (now Inprise) JBuilder and two important servlet engines, JRun from Live Software and ServletExec from New Atlanta. While I didn’t have a chance to try ServletExec, I was quite impressed with JRun, which provides not only the basic servlet engine but advanced features like servlet chaining and session handling, previously available only in the Java Web Server. Both JRun and ServletExec run the servlet API on several platforms and multiple web servers. One of them is certain to meet your needs.

This book provides a fairly direct path to productivity, from the Servlet Overview in Chapter 1 to the features available in the Java Web Server in Chapter 2, and Your First Servlet in Chapter 3. The author takes a look at using JRun in Chapter 4, walking the reader through the installation and configuration process. We use Sun’s Java Web Server in production at Atrieva, for a variety of reasons, but I was able to configure a useful servlet development environment on my NT laptop by extending the Microsoft web server with JRun in just a few minutes. After a little experimentation I found the implementation to be sufficiently comprehensive to remove the larger Java Web Server, which was consuming a larger portion of my hard-drive.

The examples in this book are useful and demonstrate several important techniques in servlet development. Chapter 5 explores Servlet Chaining, which allows servlets to pass their output to the input stream of the next servlet in a chain, similar to the way pipes are used by typical operating system shells. Chapters 6 and 7 look at server-side includes and HTML form handling. Of course, no servlet book would be complete without coverage of JDBC to access databases. The author even covers connection pooling which provides performance enhancements that are well worth exploring.

Chapters 9 to 14 provide a variety of interesting examples covering a corporate application, HTTP tunneling, automation of common coding in access servlets, using JAR files for distribution, multi-tiered database solutions and combining servlets and RMI technology. Each of these areas offers potential insights into problems you may have to address if you’re developing commercial web applications using servlet technology.

Of the two Servlet books on the market today, this is probably the better choice. Java Servlets provides the tools and foundation necessary to make a developer productive with Java servlets in minimum time. The books might benefit from more comprehensive coverage of advanced servlet techniques rather than exploring code automation and JAR packaging issues in chapters 11 and 12. I found these topics to be slightly out of place, though not badly presented. The author’s style is simple and pleasant. The example code is clean and leads the reader to a good understanding of basic servlet technology. In short, pick it up if you need to understand servlet technology. It’ll get you where you need to go.