This page serves as a companion to Inside Servlets, Second Edition by listing updates that address the latest changes to the Java Servlet Specification as well as clarifications and corrections for all known errors. If you discover an error not listed here, please notify me at

NOTE: Red text indicates an error and green text represents the correction.

Chapter 2 - Page 35

TYPO: At the beginning of the fourth paragraph, "Windows NT 12000" should read "Windows NT/2000".
Chapter 4 - Page 73

TYPO: At the end of the third paragraph, "noncJava virtual machineompiled" should read "noncompiled".
Chapter 5 - Page 86

TYPO: In step 5, the phrase "passing the objects constructed in step 5 as parameters" should read "passing the objects constructed in step 4 as parameters".
Chapter 7 - Pages 167, 187, and CD

A bug in the BulletinBoard servlet prevents the current bulletin board topic from being changed. To fix this problem, change this line (found on pages 167 and 187):

out.println("<BR><FORM METHOD=\"POST\">");

To this:

out.println("<BR><FORM METHOD=\"POST\" ACTION=\"" +
  request.getContextPath() + request.getServletPath() + "\">");

The flawed code can be found on line 93 of the source file that is included on the book's CD. Alternatively, the patched BulletinBoard servlet can be downloaded here.

In conjunction with this code change, the paragraph beginning at the bottom of page 167, should read:

These lines of code open the try block and begin sending HTML to the client. An HTML form is created in order to send the user's selection back to the server. Notice that the <FORM> tag's ACTION attribute indicates that the browser should post the form data back to the servlet (specified by the request.getServletPath() method call).
Chapter 9 - Page 240

The second paragraph makes reference to a class called javax.servlet.HttpServlet. However, this should actually read javax.servlet.http.HttpServlet.
Chapter 16 - Page 433

The fourth paragraph makes reference to a file called phonebook.sql located on the CD. However, this file is actually named employee_ddl.sql on the CD.
Chapter 18 - Page 538

For clarification, the paragraph above the NOTE on this page should read:

This action is similar to the following scriptlet (except that jsp:useBean first attempts to locate the bean within the specified scope). However, the jsp:useBean action uses an XML format that is easier to read and more accessible to page designers and HTML programmers.
Chapter 22 - Page 671 and CD

Their is a bug in the MultipartRequestParser class (line 386 of The following line:

int bytesRead = in.readLine(bytes, 0, BUFFER_SIZE);

Should read:

int bytesRead = in.readLine(bytes, 0, bytes.length);
Chapter 26 - Page 767

TYPO: "slifecyclepecification" in NOTE should read "specification".
Appendix G - Page 819

To maintain consistency with the output shown on page 36, change the default port for the Java HTTP server from 8080 to 80 by changing this line:

static final int PORT = 8080; //default port

To this line:

static final int PORT = 80; //default port