Hi B Sathish,
which chapter are you talking about
. Did I say where I took my thoughts from
.
Nevertheless, I believe you are talking about page 540 from the HFSJ book
and you are right that my thoughts are based on exactly the description there.
But let's share the information given there for others who don't have that book:
from HFSJ p. 540
Simple tags can have Classic parents
This is not a problem, because a SimpleTag's getParent() returns type JspTag, and Classic tags and Simple tags now share the JspTag super interface. Actually, Classic tags can have Simple parents, but it takes a slight hack to make that work because you can't cast a SimpleTag to the Tag return value of the Tag interface getParent(). We won't go into how to access a Simple tag parent from a Classic child tag*, but all you need to know for the exam is that by using getParent(), a Classic tag can access Classic tag parents, and a Simple tag can access either a Classic or Simple parent.
*If you are really curious, look at the TagAdapter class in the J2EE 1.4 API
Look to the bold text. That speaks clear against Answer C
. I don't know how the trick with TagAdapter works but with getParent() it does not work.
Regards,
Darya