Better, Faster, Lighter Java by Bruce A. Tate, Justin Gehtland This errata page lists errors outstanding in the most recent printing. If you have technical questions or error reports, you can send them to booktech@oreilly.com. Please specify the printing date of your copy. This page was updated April 4, 2006. Here's a key to the markup: [page-number]: serious technical mistake {page-number}: minor technical mistake : important language/formatting problem (page-number): language change or minor formatting problem ?page-number?: reader question or request for clarification Confirmed errors: (Various) Everywhere; "JPetStore" is spelled with a capital "J". It is incorrectly spelled "jPetStore" throughout the book. (3) function declarations; Replace "Long" with "long" in the following: public abstract Long getID(); public abstract void setID(Long id); public Object ejbCreate(Long id, int count) public void ejbPostCreate(Long, int count) (5) function declarations; Replace "Long" with "long" in the following: public abstract Long getId(); public abstract void setID(Long); public CounterLocal findByPrimaryKey(Long ...) Public CounterLocal create(Long ... (18) Figure 2-1; The text lists 7 points that are supposed to correspond to the numbers in Figure 2-1. However, there is no point 7 (corresponding to "Easier to maintain") in the figure. [25] 1st code snippet, 2nd line; String prefix "This code is "; should be: String prefix = "This code is "; ^ (32) Middle of Ant XML example (mid page); should be: (34) 1st paragraph in "Coupling"; Strike the last two sentences from this paragraph. They are essentially repeated in the third bullet of the following list (on p.35) (52) first bullet, second sentence; Text reads "If the coupling between your model and view are low..." Should be: "If the coupling between your model and view is low ..." {74} Annotation for 6; The annotation for "6" should end at "...appropriate XML." (78) Text following figure 4-6; PersistenceCapible should be: PersistenceCapable (89) Figure 5.1; 'Get Sponser' should be 'Get Sponsor' (163) Bottom of page: the numbered paragraph text; All of the annotation numbers are formatted with the regular font instead of the number-against-filled-in-circle formatted numbers. it is confusing! [171] Example 8 -10. Excerpt from web.xml; The line that reades "Example 8 -10. Excerpt from web.xml" should read "Example 8 -10. Excerpt from perstore-servlet.xml" {194} method execute(); String title = safeGetFieldString(d, "title"); can be left out because it is repeated after 2 lines (parameter of results.add(...)) [197] method main(), 5th line from the bottom; QueryBean query = new QueryBean("contents", indexPath, line); should be QueryBean query = new QueryBean(indexPath, line, "contents"); or QueryBean query = new QueryBean(indexPath, line); according to the constructors on page 193f. [212] "Changes to the Original Code to fit the JSP" section; The statement "JSP reflects on fields to hook up properties to display tags instead of getters and setters" is absolutely not true. The JSTL expression language (EL) can read from fields OR getter methods. Therefore, the entire section discussing the modification of HitBean is unnecessary. HitBean need not change in any way for JSP to read its properties. JSTL EL does work by using reflection, but it CAN reflect on getter methods. As an example, it translates the following syntax: to the equivalent of page.getUrl()