| 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
Ranch Hand
Joined: Dec 16, 2010
Posts: 394
|
|
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.
|
"There is no reason for any individual to have a computer in his home" ~ Ken Olson, Co-founder of DEC, 1977
|
 |
 |
|
|
subject: Head first servlets and jsp book
|
|
|