Errata

JavaServer Pages

Errata for JavaServer Pages

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released. If the error was corrected in a later version or reprint the date of the correction will be displayed in the column titled "Date Corrected".

The following errata were submitted by our customers and approved as valid errors by the author or editor.

Color key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted By Date submitted Date corrected
Printed
Page 33
6th paragraph

When referring to the environment variables to set (JAVA_HOME and PATH), JAVA_HOME is
split across two lines. For the sake of clarity, this token should not be split.

Anonymous   
Printed
Page 38
Third paragraph under "installing the book examples" heading

The stated location of the book examples on the author's website is incorrect.

He notes that they can be located at:

http://www.thejspbook.com/examples/jspbook.zip

and they're actually at:

http://www.thejspbook.com/jspbook.zip

This used to be the case but I've added a link so both URLs work now

From
<http://www.oreilly.com/catalog/9780596003173/errata/jserverpages2.unconfirmed>:

Anonymous   
Printed
Page 55
Source code

The name of instance variable fileNames, which has been written as
plural, should be replaced by fileName in the following places:
[...]

The code is correct; I use plural because it's a list of filenames, and
the code compiles and runs as-is.

Anonymous   
Printed
Page 65
The code listed in "Brief Custom Action Introduction for Java Programmers" contains

the following function:

public int doEndTag( ) {
mmb.setCategory(category);
JspWriter out = pageContext.getOut( ).
try {
out.println(mmb.getMessage( ));
}
catch (IOException e) {}
return EVAL_PAGE;
}

The second statement ends with a period rather than a semicolon.
Should be:
public int doEndTag( ) {
mmb.setCategory(category);
JspWriter out = pageContext.getOut( );
try {
out.println(mmb.getMessage( ));
}
catch (IOException e) {}
return EVAL_PAGE;
}

Anonymous   
Printed
Page 82
last paragraph

the closing tag should be </c:forEach>, not </forEach>

Anonymous   
Printed
Page 92
3rd paragraph

The paragraph starting with "The Gender field isn't represented ..." is disconnected
from following paragraph which continues the sentence started.

Anonymous   
Printed
Page 98
3rd paragraph

The sentence "For instance, February 28 is a valid date only for a
leap year". In our calendar, there is a February 28 every year. I
suppose the author meant the February 29.

Ooops, yes that's my mistake.

Anonymous   
Printed
Page 117
2nd paragraph

Also note that the error page URI in Example 9-11 includes a query string with the debug parameter, and
that a <c:out> action sets a request scope variable:
It should say
Also note that the error page URI in Example 9-11 includes a query string with the debug parameter, and
that a <c:set> action sets a request scope variable:

Anonymous   
Printed
Page 120
IN PRINT: last paragraph, second sentence

"...the <c:out> action..."

SHOULD BE:
"...the <c:set> action..."

Anonymous   
Printed
Page 120
IN PRINT: last paragraph, last sentence

"The <c:if> blocks tests..."

SHOULD BE:
"The <c:if> block tests..."

Anonymous   
Printed
Page 138
the code sample directly above table 10.4

The <c:url> tag is missing the ending " /". It should be:

<c:url value="product.jsp?id=${product.id}&customer=Hans+Bergsten" />

Anonymous   
Printed
Page 161
Table 11-3

For the "dataSource" attribute, the corresponding Java type "javax.sql.DataSource"
has the last "e" character formatted as the "or" that follows it, while it should
have the same formatting as "javax.sql.DataSourc" that it belongs to. (in other words, the "e" shouldn't be bold)

Anonymous   
Printed
Page 190
pargraph 2, sentence 1

The phrase "know as the realm" should be "known as the realm"

Anonymous   
Printed
Page 301
IN PRINT: First paragraph, second sentence

"...attribute is not the current page,..."

SHOULD BE:
"...attribute is the current page,..."

Anonymous   
Printed
Page 478
The fourth line of example 23-1

class ConnectionWrapper implements Connection {
should be:
public class ConnectionWrapper implements Connection {

Anonymous   
Printed
Page 485
code listing continued from previous page (line in bold); also in next code listing after that

References to
Config.SQL_DATASOURCE
should be
Config.SQL_DATA_SOURCE

Anonymous   
Printed
Page 495
first try{} block in doEndTag() method

"List values = new List();"
should be
"List values = new ArrayList();"

In addition, the "import java.util.List" statement at the top of the same page should be changed to "import j
ava.util.*"

Anonymous   
Printed
Page 504
IN PRINT: "Scripting Elements" section, "Syntax 2" subsection

<jsp.declaration>declaration</jsp:declaration>

SHOULD BE:
<jsp:declaration>declaration</jsp:declaration>

Anonymous   
Printed
Page 505
IN PRINT: "Expression" section, "Syntax 2" subsection

<jsp.expression>expression</jsp:expression>

SHOULD BE:
<jsp:expression>expression</jsp:expression>

Anonymous   
Printed
Page 505
IN PRINT: "Scriptlet" section, "Syntax 2" subsection

<jsp.scriptlet>scripting code fragment</jsp:scriptlet>

SHOULD BE:
<jsp:scriptlet>scripting code fragment</jsp:scriptlet>

Anonymous   
Printed
Page 510
in the Syntax section for jsp:plugin

The "codeBase" attribute
should be
"codebase" for jsp:plugin.

Anonymous   
Printed
Page 520
last Example

Is:
<c:if test=${empty param.empDate}">

SHOULD BE:
<c:if test="${empty param.empDate}">

Anonymous   
Printed
Page 543
IN PRINT: Syntax 2 and Syntax 3

<sql:query....
</sql:query>

SHOULD BE:
<sql:update...
</sql:update>

Anonymous