aspose file tools*
The moose likes JSP and the fly likes Head first servlets and jsp book Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Head first servlets and jsp book" Watch "Head first servlets and jsp book" New topic
Author

Head first servlets and jsp book

Suneel Siwal
Greenhorn

Joined: Dec 29, 2011
Posts: 1
Respected Programmers,

I am studying head first servlets and jsp new book.
on page no. 383, there is a request scoped attribute currentTip.
On page 384, a getter method getCurrentTip() gets the currentTip
pageContent.getCurrentTip()
As far as the book has taught, getter methods get properties of the attribute.
currentTip can not be an attribute then.


Is pageContent attribute and currentTip its property?

It was taught that property is what is obtained from getProperty() method:-
getName() is a method, then name is the property.


Thank You SIR
J. Kevin Robbins
Bartender

Joined: Dec 16, 2010
Posts: 1070
    
  13

From the book errata:

I think the line ${pageContent.currentTip} should be ${pageContext.currentTip}. Also 3 occurences on page 384

Note from the Author or Editor:
The 'pageContent' was meant to be a wrapper object, but the text never made that clear. Rewrite the third line of code as: ${currentTip}

So pageContent is an object (such as a bean) and currentTip is a property.

You can find the errata here:

http://oreilly.com/catalog/errata.csp?isbn=9780596516680

You'll need it. There are lots of errors including some invalid test answers.


"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." -- Ted Nelson
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Head first servlets and jsp book