JavaServer POages OReilly - book review
Seller was great but this is 1 of the OReilly books that's to wordy and has mistakes in the examples. I would not recommend.
Beautifully written
This is an extremely well written and informative book. I have
lots of experience with servlets, so I don't know how the book
will appeal to page designers, but I had no problem reading and
enjoying the chapters oriented more toward them. I used to look
at JSP and see the same kind of maintenance nightmare that comes
with something like PHP when your project gets large. I have
been using WebMacro/Velocity but am now a convert to JSP since
it has matured. I love the author's philosophy of no scriptlets
in your JSPs. I own many programing books, but I believe this
is the best written I've seen.
Perfect book for a structured reader.
If you are looking for a quick cookbook this should not be your choice. If you want to learn JSP in depth, buy it right now. Hans guides you from the basics to comprehensive details of JSP technology in a very structured way.
In any case, (from my point of view) JSP is not the whole jigsaw for building web applications, it's just a piece of it. So don't expect to be able to build real web applications if you just have read this book. At least, consider reading also Java, Struts/MVC and SQL.
Good, but not great, user guide for JSP
Perhaps this is as good a user guide as is possible for JSP, which is a good, but not great techology.
JSP integrates between web markup user interfaces (usually HTML) and back-end java technology (usually servlets), and best practices have most of the interesting work done in these technologies, not in JSP. JSP's flaws come from too many spurious features that lead the unsuspecting user far away from best practices.
JSP's strengths as a template technology for web view markup come in its 2.0 version with its addition of programmatic logic to markup (JSTL for logical branches and loops, and tags for subroutines) which allow for development of markup without repeated code. This is a great benefit of JSP, and this book does a fairly good job of explaining it for JSTL/logic, but talks around it with confusing examples for tags/subroutines. To this book's credit, it is the only decent reference I have found for JSP 2.0 tag library development.
Best practices with JSP as an integration technology involve what is called "Model 2 MVC" where the JSP page is strictly used only as a template for markup (the "view" which is the "V" from "MVC"), a JavaBean is used for the M-"model" and a single servlet is used for the C-"controller". This concept is mentioned in this book, but its up to you to figure out how to implement it, and the book is full of examples that show off unrealistic uses of JSP's spurious features and are anything but best practices. At some point in using JSP's and servlets, you are going to have to go head-to-head (actually, head-to-confusing-XML) with a real deployment descriptor, and this book will give you little help as to why it doesn't work.
Until someone writes a truly useful reference for JSP and servlets, you will have to follow the time-honored tradition of finding an example that works and cut-and-pasting it into your web application. Poring over this book will help some, as will poring over Craig McClanahan's online doc that comes with Tomcat. The best book I've found so far for explaining best practice design with JSP is Rod Johnson's "expert one-on-one J2EE Design and Development" (read the chapters on web-tier MVC design and views in the web tier) though it's description of JSP is somewhat dated, and it won't help you out with implementation details.
Horribly disorganized
O'Reilly falls down on its usual excellent editorial job and delivers an undisciplined unstructured mess that is useless as a reference. The JSTL examples are so incomplete as to be virtually worthless. As an experienced developer, I spent my 45 bucks expecting a useful reference and practical guide, instead getting a beginner's tour and some appendices of jstl syntax spec.