Useful Collection of Examples in Servlet Programming

Pragmatic examples, effectively explained, delivered in a clear, concise manner, taken from the real-world.


ORIGINAL DRAFT

Servlets have quickly become the preferred choice for web developers who want to write applications that perform well on virtually any platform. There’s a huge advantage to knowing a well designed and written servlet can be used on virtually any web or application server, making it possible to handle higher load through hardware increments rather than new development. Alan Williamson has done an admiral job of teaching servlet programming through useful, typically non-trivial, examples that demonstrate real-world solutions to common problems. If you plan to, or already work with servlets, this book we help you hone your craft and allow you to draw on some good ideas in the process.

As you might expect, this book takes the time required to explore the Servlet API and how to work with servlet engines, including the Java Web Server, JRun and ServletExec. Williamson offers some tips on effective debugging techniques and a quick look at the CGI (Common Gateway Interface) paradigm and how you can accomplish everything you could with servlets. Chapters 7 to 25, with a few minor exceptions, offer a wide variety of example servlet solutions, ranging from page counters to an online shopping cart.

I would have liked the large collection of code more if the author had followed Java conventions. Developers with a C++ background were taught the Hungarian notation which prefixes variables with their data types. I personally find the result messy and cryptic rather than clarifying, though this is more a matter of style than correctness. The use of underscore prefixes in method arguments and inconsistent first letter upper-casing in class names (the Java convention) takes away from the otherwise good quality of the code. None of this should deter you from buying the book.

The layered unveiling of concepts, clear explanations and effective communication style of the author make this book an excellent choice for novice or expert servlet developers alike. The examples are numerous and pragmatic, providing a practical look at the development process and exploring potentially useful foundations you can take and apply in a real commercial solution. In all, this book delivers on the promise of teaching servlet programming by example and represents a fine investment for almost any Java programmer.