Corrections for Murach’s Java Servlets and JSP (2nd Edition)
These are the corrections for the significant errors in each printing of this book. In addition to the corrections listed here, you may find some trivial typos and formatting errors. All types of corrections will be made in the next printing of the book.
How to tell which printing your book is in
Below the copyright notation on the back of the title page, you’ll find a series of numbers like this: 10 9 8 7 6 5 4 3 2 1 The number on the right of this sequence tells which printing your book is. In this example, it’s the first printing, which came out in January 2008.
Corrections to the first printing
Text corrections
Chapter 7, page 211
Under the heading “How to set a request attribute for a primitive type,” the second statement should use a wrapper class for the int value like this:
request.setAttribute("id", new Integer(id));
Chapter 8, page 253
Under the heading “How to disable cookies for Mozilla Firefox 2.0,” step 2 should have you click on the Privacy tab (rather than the Security tab).
Chapter 14, page 442
In the second paragraph, the last two sentences should be replaced with the following two paragraphs: Since type-1 and type-2 database drivers require installation on the client side, they aren’t ideal for allowing an application that’s running on the client to directly access a database that’s running on the server. As a result, you’ll typically want to use a type-3 or type-4 driver for this type of application. With a web application, of course, all of the data access code runs on the server side. As a result, you can use any type of driver to connect to the database. However, you’ll typically want to use a type-4 driver whenever one is available for the database that you’re using.
Chapter 17, page 532
In the first sentence of the opening paragraph, authentication is not defined accurately. In the next printing, we’ll replace that opening paragraph with the following: Although you can restrict access to certain parts of a web application by writing custom servlets and JSPs to work directly with HTTP requests and responses, doing that can be time-consuming and error-prone. That’s why most modern servlet containers such as Tomcat provide a built-in way to restrict access to certain parts of a web application. This is known as container-managed security, or container-managed authentication.
Chapter 23, page 673
If you add multiple items to the cart and attempt to update the quantity, it won’t work. To fix this problem, you can move the