找考题网-背景图
单项选择题

You web application uses a lot of Java enumerated types in the domain model of the application. Built intoeach enum type is a method, getDisplay(), which returns a localized, user-oriented string. There are manyuses for presenting enums within the web application, so your manager has asked you to create a customtag that iterates over the set of enum values and processes the body of the tag once for each value; settingthe value into a page- scoped attribute called, enumValue. Here is an example of how this tag is used: 10.

A.
B.
C.
D.

热门试题

单项选择题You are creating a content management system (CMS) with a web application front-end. The JSP thatdisplays 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 referencesection at the end of the generated web page. The document tag handler follows the Classic tag model andthe citation tag handler follows the Simple tag model. Furthermore, the citation tag could also be embeddedin other custom tags that could have either the Classic or Simple tag handler model. Which tag handlermethod allows the citation tag to access the document tag?()

A.public void doTag() {JspTag docTag = findAncestorWithClass(this, DocumentTag.class); ((DocumentTag)docTag).addCitation(this.docID);}
B.public void doStartTag() {JspTag docTag = findAncestorWithClass(this, DocumentTag.class); ((DocumentTag)docTag).addCitation(this.docID);}
C.public void doTag() {. Tag docTag = findAncestor(this, DocumentTag.class); . ((DocumentTag)docTag).addCitation(this.docID);. }
D.public void doStartTag() {. Tag docTag = findAncestor(this, DocumentTag.class); . ((DocumentTag)docTag).addCitation(this.docID);. }