View Review Details


Book:   Java Servlet & JSP Cookbook
Subject:   Patchy
Date:   2004-08-17 02:49:37
From:   Jez
Rating:  StarStarStarStarStar

While this book is certainly very wide-ranging, I think it achieves this at the expense of detail.


I bought this book essentially because I know a fair amount about JSPs and servlets, but wanted to research i18n, security, the jstl and the new 2.4 stuff. I also wanted the kind of tips and tricks that cookbooks normally provide in abundance.


While it provides a reasonable guide to pretty much everything, it certainly does not stand on its own - you WILL need to supplement it with other books or internet resources. For example, I needed to access the elements of a HashMap using the JSTL <forEach> tag - but while the cookbook tells you the basics of the syntax, it doesn't tell you how you access the name/value pairs specific to this type. Conversely, however, it provides rather simple and vendor-specific chapters like "Deploying an individual JSP on Tomcat".


I think a little less boilerplate text and a bit more information would make this a killer book. As it is, it is certainly useful, but I would not recommend it as the one book to buy on this topic.

Full Threads Oldest First
  • Patchy,  August 20 2004
    Submitted by Anonymous Reader   [Respond | View]

    Another good example of where they could have sacrificed boilerplate to useful info: it devotes a whole page to how you go about downloading the Java WSDP, but then in the next recipe neglects to tell you that the <c:set> tag can be used to set properties of Maps and JavaBeans as well as scoped variables, but that you need different syntax to do it.

    • Patchy,  August 24 2004
      Submitted by Anonymous Reader   [Respond | View]

      hello reader,

      I included instructions on acquiring the JWSDP, because a lot of readers will not be exposed to the latest versions of the JSTL through Tomcat 5.x, because they are not using that Tomcat version yet (particularly when the book was published in Jan 2004). The JWSDP is a reference implementation that includes Tomcat and JSTL 1.1, so it is an easy option for downloading and getting acquainted with JSTL 1.1.

      In addition, there are some examples later in Chapter 23 showing how to use the c:forEach tag with a java.util.Map, such as Example 23-8, pg.568, which uses c:forEach with a java.util.SortedMap; and recipe 23.13, which uses c:forEach with the "cookies" JSTL implicit object, a java.util.Map type. We should have referenced you from the c:forEach introduction to these examples later in the chapter. Example 16-8 on pg. 367 shows how to use c:set to place a new value into a java.util.Map object; again we should have forward referenced (or back referenced in this case!) from the JSTL chapter.
      In general, it's important to include some recipes that might seem too basic for some readers, to assist newcomers.
      Finally, thanks for the correction on the WEB-INF/classes path. I even use that path in the web application that provides the basis for the book. Aaaargh!

      Bruce
  • Patchy,  August 17 2004
    Submitted by Anonymous Reader   [Respond | View]

    Oh and I forgot - it even has at least one downright error - on p597 it states that you should save your l10n .properties files in WEB-INF - but (at least in Tomcat) they need to be in WEB-INF/classes. It took me a good 30 mins to sort out this one.