permaculture playing cards
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
JavaRanch » Java Forums » Java » JSP
Bookmark "Head first servlets and jsp book" Watch "Head first servlets and jsp book" New topic

Head first servlets and jsp book

Suneel Siwal

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
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

Joined: Dec 16, 2010
Posts: 1520

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:

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:
subject: Head first servlets and jsp book
It's not a secret anymore!