itgle.com

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、 idB、 typeC、 nameD、 classE、 scopeF、 create

题目

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 JSP page nee”相关问题
  • 第1题:

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

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

    正确答案:B

  • 第2题:

    A JSP page needs to perform some operations before servicing the first request. Where can this be done?()

    • A、 within a method called jspInit
    • B、 within the page directive of the JSP page
    • C、 within a scriptlet at the top of the JSP page
    • D、 within the  XML element

    正确答案:A

  • 第3题:

    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

  • 第4题:

    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

  • 第5题:

    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

  • 第6题:

    单选题
    要设置某个JSP页面为错误处理页面,以下page指令正确的是()。
    A

    〈%@ page errorPage=true%〉

    B

    〈%@ page isErrorPage=true%〉

    C

    〈%@ page extends=javax.servlet.jsp.JspErrorPage%〉

    D

    〈%@ page info=error%〉


    正确答案: B
    解析: 暂无解析

  • 第7题:

    单选题
    A JSP page needs to perform some operations before servicing the first request. Where can this be done?()
    A

     within a method called jspInit

    B

     within the page directive of the JSP page

    C

     within a scriptlet at the top of the JSP page

    D

     within the  XML element


    正确答案: A
    解析: 暂无解析

  • 第8题:

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


    正确答案: D,A
    解析: 暂无解析

  • 第9题:

    单选题
    Page指令用于定义JSP文件中的全局属性,下列关于该指令用法的描述不正确的是:()
    A

    <%@ page %><%@ page %>作用于整个JSP页面

    B

    可以在一个页面中使用多个<%@ page %><%@ page %>指令

    C

    为增强程序的可读性,建议将<%@ page %><%@ page %>指令放在JSP文件的开头,但不是必须的

    D

    <%@ page %><%@ page %>指令中的属性只能出现一次


    正确答案: B
    解析: 暂无解析

  • 第10题:

    单选题
    当在JSP文件中要使用到Vector对象时,应在JSP文件中加入以下哪个语句?()
    A

    〈jsp:include file=”java.util.*” /〉

    B

    〈jsp:include page=”java.util.*” /〉

    C

    〈%@ page import=”java.util.*” %〉

    D

    〈%@ page include=”java.util.*” %〉


    正确答案: D
    解析: 暂无解析

  • 第11题:

    单选题
    Your web application views all have the same header, which includes the  tag in the  elementof the rendered HTML. You have decided to remove this redundant HTML code from your JSPs and put itinto a single JSP called /WEB-INF/jsp/header.jsp. However, the title of each page is unique, so you havedecided to use a variable called pageTitle to parameterize this in the header JSP, like this: 10.${param.pageTitle} Which JSP code snippet should you use in your main view JSPs to insert the header and pass thepageTitle variable?()
    A

    <jsp:insert page=’/WEB-INF/jsp/header.jsp’>. ${pageTitle=’Welcome Page’}. </jsp:insert>

    B

    <jsp:include page=’/WEB-INF/jsp/header.jsp’>. ${pageTitle=’Welcome Page’}. </jsp:include>

    C

    <jsp:include file=’/WEB-INF/jsp/header.jsp’>. ${pageTitle=’Welcome Page’}. </jsp:include>

    D

    <jsp:insert page=’/WEB-INF/jsp/header.jsp’>. <jsp:param name=’pageTitle’ value=’Welcome Page’ /> . </jsp:insert>

    E

    <jsp:include page=’/WEB-INF/jsp/header.jsp’>. <jsp:param name=’pageTitle’ value=’Welcome Page’ /> . </jsp:include>


    正确答案: C
    解析: 暂无解析

  • 第12题:

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


    正确答案: D,B
    解析: 暂无解析

  • 第13题:

    要设置某个JSP页面为错误处理页面,以下page指令正确的是()。

    • A、〈%@ page errorPage="true"%〉
    • B、〈%@ page isErrorPage="true"%〉
    • C、〈%@ page extends="javax.servlet.jsp.JspErrorPage"%〉
    • D、〈%@ page info="error"%〉

    正确答案:B

  • 第14题:

    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

  • 第15题:

    在J2EE中,关于JSP文件中的page指令在JSP文件中出现的位置和次数,正确的是()。 

    • A、page指令可以在JSP中的任何地方,以任何顺序出现
    • B、一个JSP文件可以有任意多个page指令
    • C、一个JSP文件只能有一个page指令
    • D、在整个JSP文件中,虽然可以有多个page指令,但是任何属性/值对只能出现一次

    正确答案:A,B,D

  • 第16题:

    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

  • 第17题:

    A JSP page needs to set the property of a given JavaBean to a value that is calculated with the JSP page. Which three jsp:setProperty attributes must be used to perform this initialization?()

    • A、Id
    • B、Val
    • C、Name
    • D、Param
    • E、Value
    • F、Property

    正确答案:C,E,F

  • 第18题:

    多选题
    A session-scoped attribute is stored by a servlet, and then that servlet forwards to a JSP page. Which threejsp:useBean attributes must be used to access this attribute in the JSP page?()
    A

    id

    B

    name

    C

    bean

    D

    type

    E

    scope


    正确答案: B,D
    解析: 暂无解析

  • 第19题:

    单选题
    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’ />


    正确答案: D
    解析: 暂无解析

  • 第20题:

    单选题
    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/>


    正确答案: C
    解析: 暂无解析

  • 第21题:

    单选题
    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?()
    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>


    正确答案: D
    解析: 暂无解析

  • 第22题:

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


    正确答案: C,D
    解析: 暂无解析

  • 第23题:

    多选题
    A JSP page needs to set the property of a given JavaBean to a value that is calculated with the JSP page. Which three jsp:setProperty attributes must be used to perform this initialization?()
    A

    Id

    B

    Val

    C

    Name

    D

    Param

    E

    Value

    F

    Property


    正确答案: C,B
    解析: 暂无解析