Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Warning. Sybex book: fundamentals error.

 
Mikalai Zaikin
Ranch Hand
Posts: 3371
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, everybody.
Frankly - I like this book - as a method to check your knowledge. Reading this book, I had so many times go to Sun's documentation, because book says things, which are not correct )
That's why I am still reading it...
Here is one fundamental error from book's authors:
-----
The final method of interest is the one that enables a servlet to list all the
attributes associated with the current session:
public Enumeration getAttributeNames()
The getAttributeNames() method returns an Enumeration object of
all current attributes. If a session has no attributes, a null value is returned.
-----
"WOW" said I myself when read this. Because I thought that it returns empty Enumeration object.

I have specially tested the example:

as I expected, I got NOT null , but Enumeration object without elements (empty).
 
k space
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I agreed entirely that the book got so many errors. Because of that I still keep using it. Instead of trusting all it said, I question everything suspicious or I think is incorrect, and confirm from the JSP and Servlet specs.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic