Go back to 1Z0-858 - Java Enterprise Edition 5 Web Component Developer Certified Professional Exam

Question :-

You are creating a content management system (CMS) with a web application front-end. The JSP that displays a given document in the CMS has the following general structure: 1<%-- tag declaration --%> 2. <t:document> ... 11. <t:paragraph>... <t:citation docID='xyz' /> ...</t:paragraph> ... 99. </t:document> The citation tag must store information in the document tag for the document tag to generate a reference section at the end of the generated web page. The document tag handler follows the Classic tag model and the citation tag handler follows the Simple tag model. Furthermore, the citation tag could also be embedded in other custom tags that could have either the Classic or Simple tag handler model. Which tag handler method allows the citation tag to access the document tag?
public void doTag() { JspTag docTag = findAncestorWithClass(this, DocumentTag.class); ((DocumentTag)docTag).addCitation(this.docID); }
public void doStartTag() { JspTag docTag = findAncestorWithClass(this, DocumentTag.class); ((DocumentTag)docTag).addCitation(this.docID); }
public void doTag() { Tag docTag = findAncestor(this, DocumentTag.class); ((DocumentTag)docTag).addCitation(this.docID); }
public void doStartTag() { Tag docTag = findAncestor(this, DocumentTag.class); ((DocumentTag)docTag).addCitation(this.docID); }

Want to practice for 1Z0-858 - Java Enterprise Edition 5 Web Component Developer Certified Professional Exam ? Click here.