A custom JSP tag must be able to support an arbitrary number

题目
多选题
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

参考答案和解析
正确答案: E,B
解析: 暂无解析
如果没有搜索结果或未解决您的问题,请直接 联系老师 获取答案。
相似问题和答案

第1题:

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

第2题:

If you want to use the Java EE platform’s built-in type of authentication that uses a custom HTML page for authentication. Which two statements are true?()

  • A、Your deployment descriptor will need to contain this tag: CUSTOM.
  • B、The related custom HTML login page must be named loginPage.html.
  • C、When you use this type of authentication, SSL is turned on automatically.
  • D、You must have a tag in your deployment descriptor that allows you to point to both a login HTML pageand an HTML page for handling any login errors.
  • E、In the HTML related to authentication for this application, you must use predefined variable names fort he variables that store the user and password values.

正确答案:D,E

第3题:

关于JSP标记文件下列说法不正确的是()  

  • A、Tag File是JSP2.0新增的功能
  • B、Tag File是JSP1.2新增的功能
  • C、Tag File可以让网页开源直接使用Jsp语法制作标签
  • D、Tag File的扩展名可以是.tag

正确答案:B

第4题:

Given in a single JSP page: <%@ taglib prefix=’java’ uri=’myTags’ %> <%@ taglib prefix=’JAVA’ uri=’moreTags’ %>  Which two are true?()

  • A、The prefix ’java’ is reserved.
  • B、The URI ’myTags’ must be properly mapped to a TLD file by the web container.
  • C、A translation error occurs because the prefix is considered identical by the web container.
  • D、For the tag usage , the tag1 must be unique in the union of tag names in ’myTags’ and’moreTags’.

正确答案:A,B

第5题:

Company.com is considering converting from IPAT via replacement to IPAT via IP aliasing. What condition of IPAT via IP aliasing must be taken into consideration?()

  • A、 The clients must support gratuitous ARP.
  • B、 The network type must support gratuitous ARP.
  • C、 Additional TCP/IP interfaces must be allocated for backup in case of failure.
  • D、 Using IPAT via IP aliasing will reduce the number of rotating resource groups that can be used.

正确答案:B

第6题:

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

第7题:

下列对custom tags的论述哪个不正确()

  • A、是开发者自己定义的tag,可以在JSP页面中使用
  • B、JSP中定制标记符,实质上就是以标记的形式封装了一个俱有独立功能的Java类
  • C、必须依靠TLD文件实现custom tag到实现类的映射
  • D、是某些厂商自己实现的JSP扩展

正确答案:D

第8题:

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

第9题:

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

第10题:

Assume the tag handler for a st:simpletag extends SimpleTagSupport. In what way can scriptlet code be used 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

更多相关问题