This week's book giveaway is in the Other Open Source APIs forum. We're giving away four copies of Storm Applied and have Sean Allen, Peter Pathirana & Matthew Jankowski on-line! See this thread for details.
Author/s : Mukesh Prasad
Publisher : CreateSpace Independent Publishing Platform
Category : Servlets, JSP and Tag Libraries Review by : Ulf Dittmer
Rating : 8 horseshoes
This book teaches the foundations of server-side web development in Java by creating a basic servlet/JSP container from scratch. This is a very different, and rather interesting, approach than is usually taken. It starts with a socket client and server communicating with one another, gets into the basics of HTTP, then adds serving static files, error handling, cookies and form processing. At each step the server is extended to handle the new features, and the author explains the necessary HTTP and web concepts. The server is then extended to handle a basic version of servlets and sessions, and finally to handle a basic version of JSPs, including auto-recompilation and reloading. (All code is downloadable from the net, so instead of programming along -which is nonetheless recommended-, the reader can run the ready-made code as is.) All this takes up about two thirds of the book; the remaining chapters talk about how the features introduced with the server relate to the actual servlet and JSP specifications, and what features those provide that go further than that.
This approach works pretty well, making the reader acquainted not just with the specifics of servlets and JSPs, but also provides some detail on why certain features of the web are as they are - useful knowledge that often gets short shrift in pure programming introductions.
The lack of an index is not as strange as it sounds at first, because the book is a tutorial, meant to be read from start to finish, rather than a reference. And since it's rather short -less than 180 pages, a nice change from the usual tech tomes- and has an extensive table of contents, this reviewer didn't miss the it.
The book could have done with more extensive editing and proofreading -it was apparently self-published, as no publisher is mentioned- but the issues are minor.
Disclosure: I received a copy of this book from the publisher in exchange for writing this review on behalf of CodeRanch.
It does go into the basics of actual servlets and JSP (as opposed to the pseudo servlets and JSP the example server supports), that's what I mean by the "the remaining chapters..." sentence. The book does not tackle the design and architecture of web apps, so nothing about MVC. Given the length of the book, that's a reasonable choice to make, and there are many books and articles out there that explain those concepts, including one right here on the Ranch.