Question 5. Consider a
JSP page that contains the following code:
10. <x
uter>
11. <x:middle>
12. <x.inner></x.inner>
13. </x:middle>
14. <x
uter>
Assuming the following implementation details, identify the correct statements.
1. x
uter is implemented by OuterTag.java, which extends SimpleTagSupport.
2. x:middle is implemented by MiddleTag.java, which extends BodyTagSupport and has a body-content of tagdependent.
3. x:inner is implemented by InnerTag.java, which extends BodyTagSupport and has a body-content of tagdependent.
OPTIONS are:
1.OuterTag can get a reference to InnerTag by calling TagSupport.findChildrenWithClass() method.
2.MiddleTag can get a reference to OuterTag by calling TagSupport.findAncestorWithClass(this, OuterTag.class).
3.InnerTag can get a reference to OuterTag by calling TagSupport.findAncestorWithClass(this, OuterTag.class) method.
4.MiddleTag can get a reference to OuterTag by calling TagSupport.getParent() method.
5.InnerTag can get a reference to MiddleTag by calling TagSupport.getParent() method.
Answer is given 4.
But I want to know why 3 is wrongsource:enthuware