Errata

Java Server Pages

Errata for Java Server 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 15-19
passim

In the discussion of URLs in chapter two passim (and possibly ff, I haven't
gotten so far, partly from irritation), the author repeatedly misuses the
terms URI and URL, contributing to the widespread popular confusion on the
distinction.

The author should carefully reread the relevant RFCs, and consider their
meaning. RFC 2396 defines URI as the superset of URL and URN. It therefore
follows, wherever the author uses URI instead of URL, that he believes that
the technologies in question are capable of resolving URNs as well as URLs.

This is not, in fact, true, and most browsers are not even capable of
resolving the full set of established internet URLs. The terminology used in
the description of URL is also egregious: the first part of a URL is not a
"protocol," it is a "scheme identifier." In common use for URLs found on the
web, it refers to a protocol. But if you're going to try to explain
something (especially in an O'Reilly book), then you need to get it *right*.

It is acceptable to simplify technical subjects aimed at technically less
sophisticated readers, which is a good description of the target audience of
this chapter. However, simplification leading to misinformation is not
acceptable. Browsers cannot handle URIs. They can't handle URNs at all, and
most can't handle more than the subset http, https, ftp, mail, and possibly
some obscurities like gopher and telnet. There are many other URL types, and
some browsers support them (but you can't expect it, and in any event, using
those URLs, the HTTP protocol is almost certainly not in use; the chapter
goes on to blithely discuss only those URLs in the http/https schemes,
without noting that it is doing so).

A mention that URI includes URL would be useful; widespread substitution of
URI for the more accurate and correct URL is simply cause for flinging books
across the cubicles.

Anonymous   
Printed Page 20
Figure 2-4.

For the URL rewriting method, the response should be:

...
<html>
<a href=next.jsp?sid=xf23ad>
...

As you see, change ";" to "?" between jsp and sid.

Anonymous   
Printed Page 43
Line 19

In the 8/1 printing, a change was made to line 22 of page 43

Anonymous   
Printed Page 43
The twenty-second line of text

C:> set JAVA_HOME=C:jdk1.1.2

Has been changed to:

C:> set JAVA_HOME=C:jdk1.2.2

The same change should have been made for line 19:

C:jdk1.1.2

should be changed as well to:

C:jdk1.2.2

Anonymous   
Printed Page 56
next to last paragraph

The paragraph in question starts with "Notice that the month seems to be off by one..". This is not something the reader can notice. The month is 2 which looks fine to a reader.

I fully realize the point being made that Java dates count months differently than the rest of the world does, but seeing a month number of 2 is not something that stands out as an error.

Anonymous   
Printed Page 80
6th

public boolean equalsIgnoreCase(String anotherString)

the example is

hello.equals("Hello"); // Returns true

Shouldn't it be

hello.equalsIgnoreCase("Hello"); // Returns true

Anonymous   
Printed Page 88
Example 6-3, 8 lines from the bottom of the page

should the line

if (request.getHeader("User-Agent").indexOf("Mozilla") !=1)

be

if (request.getHeader("User-Agent").indexOf("Mozilla") !=-1)?

because we're trying to say only if the "Mozilla" does exist, it would be
netscape.

Anonymous   
Printed Page 98
last paragraph

Sentence reads:
"We use two int variables: one declared as an instance variable using a JSP
expression, and....."

Should this not read:
"We use two int variables: one declared as an instance variable using a JSP
declaration, and....."

Anonymous   
Printed Page 99
3rd line from bottom

Sentence reads:
"(using a JSP expression) to keep...."

Should this not read:

"(using a JSP declaration) to keep...."

Anonymous   
Printed Page 161
all

i think you have 2 conditions : one is insert when database is empty
AND update if you find it

What happens if you want to INSERT new data into database which is NOT
EMPTY

Anonymous   
Printed Page 217
Second code sample

The code sample :

java.text.DateFormat df = java.text.DateFormat.getDateInstance(
df.SHORT, locale);

doesn't compile.

Variable df may not have been initialized.

You can't use df while its initialization.

The following code is correct:

java.text.DateFormat df = java.text.DateFormat.getDateInstance(
java.text.DateFormat.SHORT, locale);

Anonymous   
Printed Page 260
End of the example 12.11

At the end of the example, there are two end tag </body>.
The <html> tag is then never closed.

The two last lines should be :
</body>
</html>

instead of:

</body>
</body

Anonymous   
Printed Page 306
valueBound function

The setAttribute call is missing. The code should read

public void valueBound(HttpSessionBindingEvent e) {
Vector currentUsers =
(Vector) context.getAttribute("currentUsers");
if (currentUsers == null) {
currentUsers = new Vector();
context.setAttribute("currentUsers", currentUsers);
}
currentUsers.addElement(this);
}

Anonymous   
Printed Page 340
last paragraph

<jspUseBean> should be <jsp:UseBean>

Anonymous   
Printed Page 342
fourth line of code from the bottom of example 16-5

The fourth line of code from the bottom of example 16-5 says:

out.print(pageContext.findAttribute("prod"), "name")));

This line of code must be wrong. Something must be missing and the number of left
and right parantheses does not match.

Anonymous   
Printed Page 467
example for <ora:redirect>

Closing tag in example should be "</ora:redirect>", not "</ora:encodeURL>".

Anonymous   
Printed Page 506
example under <session-config> section

the <session-timeout> tag is missing an e so it is now spelled <session-timout>

Anonymous