多选题A JSP page needs to instantiate a JavaBean to be used by only that page. Which two jsp:useBean attributes must be used to access this attribute in the JSP page?()AidBtypeCnameDclassEscopeFcreate

题目
多选题
A JSP page needs to instantiate a JavaBean to be used by only that page. Which two jsp:useBean attributes must be used to access this attribute in the JSP page?()
A

id

B

type

C

name

D

class

E

scope

F

create

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

第1题:

A JSP page needs to instantiate a JavaBean to be used by only that page. Which two jsp:useBean attributes must be used to access this attribute in the JSP page?()

  • A、 id
  • B、 type
  • C、 name
  • D、 class
  • E、 scope
  • F、 create

正确答案:A,D

第2题:

You need to create a JavaBean object that is used only within the current JSP page. It must NOT beaccessible to any other page including those that this page might import. Which JSP standard action canaccomplish this goal?()

  • A、<jsp:useBean id=’pageBean’ type=’com.example.MyBean’ />
  • B、<jsp:useBean id=’pageBean’ class=’com.example.MyBean’ />
  • C、<jsp:makeBean id=’pageBean’ type=’com.example.MyBean’ />
  • D、<jsp:makeBean id=’pageBean’ class=’com.example.MyBean’ />

正确答案:B

第3题:

在JSP页面中,正确引入JavaBean的是()  

  • A、<%jsp: useBean id =”myBean” scope =”page” class=”pkg.MyBean” %>  
  • B、<jsp: useBean name=”myBean” scope =”page” class=”pkg.MyBean” >  
  • C、<jsp: useBean id =”myBean” scope =”page” class=”pkg.MyBean” /> 
  • D、<jsp: useBean name=”myBean” scope =”page” class=”pkg.MyBean” />

正确答案:C

第4题:

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

第5题:

You have built your own light-weight templating mechanism. Your servlets, which handle each request,dispatch the request to one of a small set of template JSP pages. Each template JSP controls the layout ofthe view by inserting the header, body, and footer elements into specific locations within the template page.The URLs for these three elements are stored in request scoped variables called, headerURL, bodyURL,and footerURL, respectively. These attribute names are never used for other purposes. Which JSP codesnippet should be used in the template JSP to insert the JSP content for the body of the page?()

  • A、<jsp:insert page=’${bodyURL}’ />
  • B、<jsp:insert file=’${bodyURL}’ />
  • C、<jsp:include page=’${bodyURL}’ />
  • D、<jsp:include file=’${bodyURL}’ />
  • E、<jsp:insert page=’<%= bodyURL %>’ />

正确答案:C

第6题:

Which JSP standard action can be used to import content from a resource called foo.jsp?()

  • A、<jsp:import file=’foo.jsp’ />
  • B、<jsp:import page=’foo.jsp’ />
  • C、<jsp:include page=’foo.jsp’ />
  • D、<jsp:include file=’foo.jsp’ />

正确答案:C

第7题:

Which JSTL code snippet can be used to import content from another web resource?()

  • A、<c:import url="foo.jsp"/>
  • B、<c:import page="foo.jsp"/>
  • C、<c:include url="foo.jsp"/>
  • D、<c:include page="foo.jsp"/>

正确答案:A

第8题:

JSP中JavaBean是通过指令标签()来访问的。

  • A、〈%@ page%〉
  • B、〈jsp:useBean〉
  • C、〈jsp:setProperty〉
  • D、〈jsp:getProperty〉

正确答案:B

第9题:

You are building your own layout mechanism by including dynamic content for the page’s header and footersections. The footer is always static, but the header generates the  tag that requires the page name tobe specified dynamically when the header is imported. Which JSP code snippet performs the import of theheader content?() <title>

  • A、<jsp:include page=’/WEB-INF/jsp/header.jsp’><jsp:param name=’pageName’ value=’Welcome Page’ /> </jsp:include>
  • B、<jsp:import page=’/WEB-INF/jsp/header.jsp’><jsp:param name=’pageName’ value=’Welcome Page’ /> </jsp:import>
  • C、<jsp:include page=’/WEB-INF/jsp/header.jsp’><jsp:attribute name=’pageName’ value=’Welcome Page’ /> . </jsp:include>
  • D、<jsp:import page=’/WEB-INF/jsp/header.jsp’>. <jsp:attribute name=’pageName’ value=’Welcome Page’ /> . </jsp:import>

正确答案:A

第10题:

A JSP page needs to instantiate a JavaBean to be used by only that page.  Which two jsp:useBeanattributes must be used to access this attribute in the JSP page?()

  • A、Id
  • B、Type
  • C、Name
  • D、Class
  • E、Yscope

正确答案:A,D

更多相关问题