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

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


相似考题
更多“多选题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?()AidBnameCbeanDtypeEscope”相关问题
  • 第1题:

    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

  • 第2题:

    Which interface must a session attribute implement if it needs to be notified when a web container persistsa session?()

    • A、javax.servlet.http.HttpSessionListener
    • B、javax.servlet.http.HttpSessionBindingListener
    • C、javax.servlet.http.HttpSessionAttributeListener
    • D、javax.servlet.http.HttpSessionActivationListener

    正确答案:D

  • 第3题:

    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

  • 第4题:

    A custom tag is defined to take three attributes. Which two correctly invoke the tag within a JSP page?()

    • A、<prefix:myTag a="foo" b="bar" c="baz" />
    • B、<prefix:myTag attributes={"foo","bar","baz"} />
    • C、<prefix:myTag jsp:attribute a="foo" b="bar" c="baz" />
    • D、<prefix:myTag><jsp:attribute name="a">foo</jsp:attribute><jsp:attribute name="b">bar</jsp:attribute><jsp:attribute name="c">baz</jsp:attribute>. </prefix:myTag>

    正确答案:A,B,D

  • 第5题:

    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

  • 第6题:

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


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

  • 第7题:

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


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

  • 第8题:

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


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

  • 第9题:

    多选题
    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
    解析: 暂无解析

  • 第10题:

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


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

  • 第11题:

    单选题
    Servlet A receives a request that it forwards to servlet B within another web application in the same web container. Servlet A needs to share data with servlet B and that data must not be visible to other servlets in A’s web application.  In which object can the data that A shares with B be stored?()
    A

     HttpSession

    B

     ServletConfig

    C

     ServletContext

    D

     HttpServletRequest

    E

     HttpServletResponse


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

  • 第12题:

    多选题
    A custom tag is defined to take three attributes. Which two correctly invoke the tag within a JSP page?()
    A

    <prefix:myTag a=foo b=bar c=baz />

    B

    <prefix:myTag attributes={foo,bar,baz} />

    C

    <prefix:myTag jsp:attribute a=foo b=bar c=baz />

    D

    <prefix:myTag><jsp:attribute name=a>foo</jsp:attribute><jsp:attribute name=b>bar</jsp:attribute><jsp:attribute name=c>baz</jsp:attribute>. </prefix:myTag>


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

  • 第13题:

    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

  • 第14题:

    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

  • 第15题:

    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

    正确答案:A,D,E

  • 第16题:

    Your web application uses a simple architecture in which servlets handle requests and then forward to aJSP using a request dispatcher. You need to pass information calculated in the servlet to the JSP for view generation.This information must NOT be accessible to any other servlet,JSP or session in the webapp. Which two techniques can you use to accomplish this goal?()

    • A、Add attributes to the session object.
    • B、Add attributes on the request object.
    • C、Add parameters to the request object.
    • D、Use the pageContext object to add request attributes.
    • E、Add parameters to the JSP’s URL when generating the request dispatcher.

    正确答案:B,E

  • 第17题:

    Servlet A receives a request that it forwards to servlet B within another web application in the same web container. Servlet A needs to share data with servlet B and that data must not be visible to other servlets in A’s web application.  In which object can the data that A shares with B be stored?()

    • A、 HttpSession
    • B、 ServletConfig
    • C、 ServletContext
    • D、 HttpServletRequest
    • E、 HttpServletResponse

    正确答案:D

  • 第18题:

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


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

  • 第19题:

    单选题
    A session-scoped attribute, product, is stored by a servlet. That servlet then forwards to a JSP page. This attribute holds an instance of the com.Company.   Product class with a name property of “The Matrix” and price property of 39.95. Given the JSP page code snippet: What is the response output of this JSP page code snippet? ()
    A

     Default costs 0.0

    B

     Default costs 49.95

    C

     Default costs 39.95

    D

     The Matrix costs 0.0

    E

     The Matrix costs 49.95

    F

     The Matrix costs 39.95


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

  • 第20题:

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


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

  • 第21题:

    多选题
    Your web application uses a simple architecture in which servlets handle requests and then forward to aJSP using a request dispatcher. You need to pass information calculated in the servlet to the JSP for view generation.This information must NOT be accessible to any other servlet,JSP or session in the webapp. Which two techniques can you use to accomplish this goal?()
    A

    Add attributes to the session object.

    B

    Add attributes on the request object.

    C

    Add parameters to the request object.

    D

    Use the pageContext object to add request attributes.

    E

    Add parameters to the JSP’s URL when generating the request dispatcher.


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

  • 第22题:

    多选题
    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,E
    解析: 暂无解析

  • 第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


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

  • 第24题:

    单选题
    Which interface must a session attribute implement if it needs to be notified when a web container persistsa session?()
    A

    javax.servlet.http.HttpSessionListener

    B

    javax.servlet.http.HttpSessionBindingListener

    C

    javax.servlet.http.HttpSessionAttributeListener

    D

    javax.servlet.http.HttpSessionActivationListener


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