Two Laptop Bag*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Doubt on Q 3 HFSJ chapter 10 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Doubt on Q 3 HFSJ chapter 10" Watch "Doubt on Q 3 HFSJ chapter 10" New topic
Author

Doubt on Q 3 HFSJ chapter 10

muthu kumaran
Ranch Hand

Joined: Oct 26, 2004
Posts: 56
Hi
For Q 3 in chapter 10 (page 560), I feel that none of the answers are right

Question
<my:tag1>
<my:tag2>
<my:tag3/>
<my:tag2>
<my:tag1>

where tag1 - extends TagSupport
tag2 - extends SimpleTagSupport
tag3 - extends TagSupport

Now the answer for this question is given as Option C ,
which says

"Tag3 Handler may use the getParent method twice to gain access to the
instance of Tag1 Handler"

But Tag3 is a classic Tag whereas Tag2 is a Simple Tag. So our call to
getParent fails here itself , coz a classic Tag's getParent() returns a "Tag" interface , which is not implemented by a SimpleTag.

When the call fails here, how can we use getParent() twice to access Tag 1

Can anyone explain me why this option is specified as correct one ? :roll:
Vishnu Prakash
Ranch Hand

Joined: Nov 15, 2004
Posts: 1026
Yes that question doesn't have any correct answer.

Check the Errata


Servlet Spec 2.4/ Jsp Spec 2.0/ JSTL Spec 1.1 - JSTL Tag Documentation
muthu kumaran
Ranch Hand

Joined: Oct 26, 2004
Posts: 56
oh..thanks vishnu
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Doubt on Q 3 HFSJ chapter 10