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.

The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.

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

Version Location Description Submitted by Date submitted
Printed Page xix
"Constant Width" section

It should be "method names" not "methods names" in "...including keywords, data
types, constants, methods names, variables, class names, and interface names."

Anonymous   
Printed Page 6
3rd paragraph

Extra "a" in "...access a databases and perform other application tasks." (Or else
make "databases" singular.)

Anonymous   
Printed Page 26
last paragraph

extraneous bracket in the parenthetical remark "(known as the [JSP page
implementation class)".

Anonymous   
Printed Page 32
3rd paragraph from bottom

The Windows 2000 and XP Control Panel item is called "System" not "Systems" in
"...you can do the same with the Systems tool by first selecting the Advanced tab and
then Environment Variables." It probably would be a little clearer to say "with the
Control Panel item called System" (or System Properties for NT)

Anonymous   
Printed Page 38
last paragraph on the page

C:JSPBook> xcopy /s /i ora %CATALINA_HOME%webappsora

On my PC using a Windows NT operating system this xcopy command did not work. The
error message was something akin to "too many parameters".

As a substitute for the xcopy command, I simply used Windows NT Explorer to move the
ora directory [and its subdirectories] to the
webapps directory in the Tomcat installation.

Moving the ora directory in this way worked just fine. Your examples web application
installed just fine and I was able to use it in Tomcat.

Anonymous   
Printed Page 48
3rd paragraph, 2nd sentence

Should be: "I'll show you...." as opposed to "I show you..."

Anonymous   
Printed Page 58
Figure 6.1

The figure shows the URL entered as
http://localhost:8080/book/ch6/cartoon.jsp
rather than
http://localhost:8080/ora/ch6/cartoon.jsp

The application is also referenced as "/book" in these figures:

pg 62 Figure 6.2
pg 70 Figure 7.2

Anonymous   
Printed Page 73
Table 7-3

The mnemonic for "Test for greater than or equal" should be 'ge', not 'gt'

Anonymous   
Printed Page 75
last paragraph

Slight garble in "...and you have a rough idea about of what the JSTL EL is all
about." Probably remove first "about", but could alternatively remove "of".

Anonymous   
Printed Page 92
4th paragraph (beginning with "The <c:choose>...")

In the 3rd line, the sentence "A <c:choose> block is used pick..." is missing the
word "to". It should be "A <c:choose> block is used to pick..."

Anonymous   
Printed Page 96
Table 8-8

The "valid" entry says "Does all properties have valid values?" It should be "Do..."

Anonymous   
Printed Page 112
<ora:fileWrite> code blocks

It doesn't make sense to include HTML tags inside the body of the <ora:fileWrite>
element. The <br> is just getting written verbatim to the log file.

Anonymous   
Printed Page 117
2nd paragraph

The paragraph incorrectly refers to <c:out> (... and that a <c:out> action sets a
request scope variable) but the example below shows the correct <c:set ...>.

The paragraph should mention <c:set>, not <c:out>.

Anonymous   
Printed Page 126
footnote

Should be "exists" instead of "exist" in "It actually does one thing when the
bean already exist..."

Anonymous   
Printed Page 129
2nd paragraph

Should be "tests" instead of "test" in "A <c:choose> action element with nested
<c:when> and <c:otherwise> actions test if the input is valid..."

Anonymous   
Printed Page 133
Figure 10-5

The URL in the "URL rewriting method" example should be "next.jsp?sid=xf23ad" instead
of "next.jsp;sid=xf23ad". The first URL parameter should be separated by question
mark.

Anonymous   
Printed Page 137
Table 10-3, "context" entry

extra space in "is n't" in "...if the resource is n't part of the current
application".

Anonymous   
Printed Page 152
Figure 11-2

The figure shows "search.jsp" as the initial page, but the text (and the sample code)
use "search.html".

Anonymous   
Printed Page 161
Table 11-3

The "scope" attribute refers to the scope of the "var" attribute, not the scope of
the data source. It should read "The scope of the variable..." instead of "The scope
of the data source..."

Anonymous   
Printed Page 163
1st paragraph

Should be "attack" instead of "attacks" in "Using <sql:param> prevents this type of
attacks."

Anonymous   
Printed Page 164
Table 11-5

The "scope" attribute should read "The scope for the variable..." instead of "The
scope for the data source...".

Anonymous   
Printed Page 175
Example 11-6

The "dataSource" value "${example}" isn't defined and should probably be deleted in this line:

<sql:query var="empList" dataSource="${example}"

Anonymous   
Printed Page 177
2nd paragraph

Should be "reasonable" or "reasonably limited" or some such instead of "reasonably"
in "For a reasonably number of rows..."

Anonymous   
Printed Page 197
1st paragraph under "Using cookies to remember the username and password"

The first line "The more web application" is separated from the remainder of the
sentence & paragraph by an erroneous paragraph break.

Anonymous   
Printed Page 218
3rd paragraph under "Using Localized Text"

"PropertyResourceBundle" is misspelled in the first sentence as
"PropertResourceBundle".

Anonymous   
Printed Page 222
Bottom half of Example 13-1

The name of the radio buttons in the "calculate.jsp" form are listed as "answerID".
They should be "answer" (which is how they are referred to on page 228).

Another minor typo: On page 227, the "number_of_votes" key should equal "Total number
of votes". (I crossed it out in my book so I can't be sure, but I think it said
"Totalt number of votes".) Like I said, minor typo.

Anonymous   
Printed Page 313
Sample commands after 3rd paragraph

In the jspc command, the option webinc at the beginning of the line is missing a - in
front of it. It should read:

... > jspc -d jspsrc
-webinc jspsrcweb.inc ...
^
|
|

Anonymous   
Printed Page 314
Command samples after 2nd paragraph

In the last two commands, where the Java compiler is invoked, immediately after
javac, option d is specified but is missing the - in front of it. Both should read:

... binjavac -d classes ...
^
|
|

Anonymous   
Printed Page 314
2nd paragraph & following command examples

In the paragraph, jasper-runtime.jar Tomcat JAR file has an incomplete path. It
should be common/lib/jasper-runtime.jar, not just lib/jasper-runtime.jar.

Similarily in the command setting CLASSPATH to include
jasper-runtime.jar, it should be refered to as

%CATALINA_HOME%commonlibjasper-runtime.jar

Anonymous   
Printed Page 341
Last paragraph in the "Compiling and Installing a Servlet" section.

In the above referenced paragraph, you mention that you may run any servlet using the
/servlet prefix. This WAS true with Tomcat prior to versions 4.0.6/4.1.12.

Due to a security problem discovered with the invoker servlet, this feature was
turned off in Tomcat 4.0.6/4.1.12. For people new to Tomcat (like me), I was very
confused trying to get this feature to work.

I suggest that you put a note at the bottom of the page referencing a URL (e.g. on
your thejspbook.com website) where users can go to which instructs them on how to
enable the invoker servlet for these versions of Tomcat, so users may test their
servlets (such as on your website).

See: http://www.securitytracker.com/alerts/2002/Sep/1005290.html

for more info on the security problem, and why they disabled the invoker servlet.

Anonymous   
Printed Page 341
Line says http://localhost:8080/ora/servlet/HelloWorld

Changes to Tomcat 4.1.12 prevent this (and other) servlets from running with this
type of calling syntax. The following link explains why and how to fix it.
Basically starting with this version of Tomcat, this method of calling servlets has
been commented out in the tomcat web.xml file for security reasons. You can easily
un-comment it so it functions again.

See the article at www.javapro.com called "Fixing Tomcat 4.1.12"
The latest version of this popular Web container can make your apps stop working. But
you can fix it.
by Budi Kurniawan
Posted November 8, 2002

This url might get you there:
http://www.fawcette.com/javapro/2002_11/online/servletsjsp_bkurniawan_11_08_02/default.asp.

Anonymous   
Printed Page 563
1st paragraph of "Property and array accessor operators"

Missing the closing ']' in the last EL expression. It should be
${exprA['identifierB']}

Anonymous