SCWCD(310-083)

多选题Given in a single JSP page:   Which two are true?()AThe prefix ’java’ is reserved.BThe URI ’myTags’ must be properly mapped to a TLD file by the web container.CA translation error occurs because the prefix is considered identical by the web container.

题目
多选题
Given in a single JSP page:   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’.

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

第1题:

A developer wants a web application to be notified when the application is about to be shut down. Which two actions are necessary to accomplish this goal?()

  • A、Include a listener directive in a JSP page
  • B、configure a listener in the TLD file using the  element
  • C、Include a  element in the web application deployment descriptor
  • D、configure a listener in the application deployment descriptor, using the  element
  • E、Include a class implementing ServletContextListener as part of the web application deploymen

正确答案:D,E

第2题:

下面哪个方法不属于JSP指令:()

  • A、<jsp:param name=”username” value=”liu”/>
  • B、<%@include file=”head.jsp”%>
  • C、<%@taglib uri=”/struts.tags” prefix=”s”%>
  • D、<%@page contectType=”texthtml,charset=gb2312”%>

正确答案:A

第3题:

在J2EE中,在my.jsp中使用标记扩展,下列选项正确的是()

  • A、<%@ taglib URL=”/hello”  prefix=”examples”%> 
  • B、<%@ taglib URI=”/hello”  prefix=”examples”%> 
  • C、<%@ taglib url=”/hello”  prefix=”examples”%> 
  • D、<%@ taglib uri=”/hello”  prefix=”examples”%>

正确答案:D

第4题:

要使用JSTL的核心标签库,需要在JSP源文件的首部加入如下什么声明语句?()

  • A、〈%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %〉
  • B、〈%@ taglib prefix="x" uri="http://java.sun.com/jsp/jstl/xml" %〉
  • C、〈%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %〉
  • D、〈%@ taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql" %〉

正确答案:A

第5题:

在JSP中,若要在JSP正确使用标签:,在jsp中声明的taglib指令为:<%@tagliburi=“/WEB-INF/myTags.tld”prefix=“()”%>。

  • A、x
  • B、getKing
  • C、myTags
  • D、king

正确答案:A

第6题:

To take advantage of the capabilities of modern browsers that use web standards, such as XHTML andCSS, your web application is being converted from simple JSP pages to JSP Document format. However,one of your JSPs, /scripts/screenFunctions.jsp, generates a JavaScript file. This file is included in severalweb forms to create screen-specific validation functions and are included in these pages with the followingstatement: 10. 11.  14. 15. Which JSP code snippet declares that this JSP Document is a JavaScript file?()

  • A、<%@ page contentType=’application/javascript’ %>
  • B、<jsp:page contentType='application/javascript' />
  • C、<jsp:document contentType='application/javascript' />
  • D、<jsp:directive.page contentType='application/javascript' />
  • E、No declaration is needed because the web form XHTML page already declares the MIME type of the /scripts/screenFunctions.jsp file in the <script> tag.

正确答案:D

第7题:

You are developing several tag libraries that will be sold for development of third-party web applications.You are about to publish the first three libraries as JAR files: container-tags.jar,advanced-html-form-tags.jar, and basic-html-form-tags.jar. Which two techniques are appropriate for packaging the TLD files forthese tag libraries?()

  • A、The TLD must be located within the WEB-INF directory of the JAR file.
  • B、The TLD must be located within the META-INF directory of the JAR file.
  • C、The TLD must be located within the META-INF/tld/ directory of the JAR file.
  • D、The TLD must be located within a subdirectory of WEB-INF directory of the JAR file.
  • E、The TLD must be located within a subdirectory of META-INF directory of the JAR file.

正确答案:B,E

第8题:

A JSP page contains a taglib directive whose uri attribute has the value dbtags. Which XML element withinthe web application deployment descriptor defines the associated TLD?()

  • A、<tld><uri>dbtags</uri><location>/WEB-INF/tlds/dbtags.tld</location></tld>
  • B、<taglib><uri>dbtags</uri><location>/WEB-INF/tlds/dbtags.tld</location>. </taglib>
  • C、<tld>. <tld-uri>dbtags</tld-uri>. <tld-location>/WEB-INF/tlds/dbtags.tld</tld-location> . </tld>
  • D、<taglib><taglib-uri>dbtags</taglib-uri><taglib-location>/WEB-INF/tlds/dbtags.tld. </taglib-location>. </taglib>

正确答案:D

第9题:

在java程序中的my.jsp中要使用标记扩展,下列选项正确的是()。

  • A、%@taglib URL=“/hello”prefix=“examples”%>
  • B、%taglib URI=“/hello”prefix=“examples”%>
  • C、%@taglib url=“/hello”prefix=“examples”%>
  • D、%@taglib uri=“/hello”prefix=“examples”%>

正确答案:D

第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

更多相关问题