单选题Given the Tag:   Assuming the tag referenced by my Tags: get Advice uses the Classic event model,  which is true?()A  The do After Body method is called.B  The doEnd Tag method is NOT called.C  The type attribute may be specified in the TLDD  The do St

题目
单选题
Given the Tag:   Assuming the tag referenced by my Tags: get Advice uses the Classic event model,  which is true?()
A

 The do After Body method is called.

B

 The doEnd Tag method is NOT called.

C

 The type attribute may be specified in the TLD

D

 The do Start Tag Method must always return SKIP_BODY.

E

 The TLD for this tag must NOT include a  tag.

如果没有搜索结果或未解决您的问题,请直接 联系老师 获取答案。
相似问题和答案

第1题:

Given: 6. 7.<%="processing" %> 8. and a custom tag handler for foo which extends TagSupport. Which two are true about thetag handler referenced by foo?()

  • A、The doStartTag method is called once.
  • B、The doAfterBody method is NOT called.
  • C、The EVAL_PAGE constant is a valid return value for the doEndTag method.
  • D、The SKIP_PAGE constant is a valid return value for the doStartTag method.
  • E、The EVAL_BODY_BUFFERED constant is a valid return value for the doStartTag method.

正确答案:A,C

第2题:

Assume the tag handler for a st:simple tag extends Simple Tag Support. In what way can scriptlet code beused in the body of st:simple?()

  • A、Set the body content type to JSP in the TLD
  • B、Scriptlet code is NOT legal in the body of st:simple.
  • C、Add scripting-enabled="true" to the start tag for the st:simple element
  • D、Add a pass-through Classic tag with a body content type of JSP to the body of st:simple, and place the scriptlet code in the body of that tag

正确答案:B

第3题:

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.  ... 11. ...  ... ... 99.  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);. }

正确答案:A

第4题:

Which statement is true if the do Start Tag method returns EVAL_BODY_BUFFERED?()

  • A、 The tag handler must extend body Tag.
  • B、 The do After Body method is NOT called.
  • C、 The set Body Content method is called.
  • D、 It is never legal to return EVAL_BODY_BUFFERED from do Start Tag.

正确答案:C

第5题:

Which three occur during JSP page translation?()

  • A、 The jspInit method is called.
  • B、 The JSP page implementation class is created.
  • C、 The JSP page implementation class is compiled.
  • D、 The JSP page is validated for syntatic correctness.
  • E、 The associated tag files are validated for syntatic correctness.

正确答案:B,C,D

第6题:

Which two statements are true about the security-related tags in a valid Java EE deployment descriptor?()

  • A、Every  tag must have at least one  tag.
  • B、A  tag can have many  tags.
  • C、A given  tag can apply to only one  tag.
  • D、A given  tag can contain from zero to many  tags.
  • E、It is possible to construct a valid  tag such that,for a given resource,no user rolescan access that resource.

正确答案:B,E

第7题:

Given the Tag:   Assuming the tag referenced by my Tags: get Advice uses the Classic event model,  which is true?()

  • A、 The do After Body method is called.
  • B、 The doEnd Tag method is NOT called.
  • C、 The type attribute may be specified in the TLD
  • D、 The do Start Tag Method must always return SKIP_BODY.
  • E、 The TLD for this tag must NOT include a  tag.

正确答案:C

第8题:

A custom JSP tag must be able to support an arbitrary number of attributes whose names are unknown when the tag class is designed.  Which two are true? ()

  • A、 A  element in the echo tag LTD must have the value JSP
  • B、 The echo tag handler must define the setAttribute (String key, String value) method
  • C、 The true element must appear in the echo tag TLD
  • D、 The class implementing the echo tag handler must implement the javax.sevlet.jsp.tagext.IterationTag interface
  • E、 The class implementing the echo tag handler must implement the javax.sevlet.jsp.tagext.DynamicAttributes interface

正确答案:C,E

第9题:

Under what two circumstances is the set JspBody method NOT called in a tag class that implements the Simple Tag interface? ()

  • A、 The tag is invoked without a body.
  • B、 The doTAb method throws an exception.
  • C、 The  element has the value empty.
  • D、 The tag is called with the attribute skip-body=true

正确答案:A,C

第10题:

A web application contains a tag file called beta.tag in /WEB-INF/tags/alpha. A JSP page called sort.jspexists in the web application and contains only this JSP code: 1.<%@ taglib prefix="x" 2.tagdir="/WEB-INF/tags/alpha" %> 3. The sort.jsp page is requested. Which two are true?()

  • A、Tag files can only be accessed using a tagdir attribute.
  • B、The sort.jsp page translates successfully and invokes the tag defined by beta.tag.
  • C、The sort.jsp page produces a translation error because a taglib directive must always have a uriattribute.
  • D、Tag files can only be placed in /WEB-INF/tags, and NOT in any subdirectories of /WEB- INF/tags.
  • E、The tagdir attribute in line 2 can be replaced by a uri attribute if a TLD referring to beta.tag is createdand added to the web application.

正确答案:B,E

更多相关问题