单选题Assume a JavaBean com.example.GradedTestBean exists and has two attributes. The attribute name is oftype java.lang.String and the attribute score is of type java.lang.Integer. An array of com.example. GradedTestBean objects is exposed to the page in a 

题目
单选题
Assume a JavaBean com.example.GradedTestBean exists and has two attributes. The attribute name is oftype java.lang.String and the attribute score is of type java.lang.Integer. An array of com.example. GradedTestBean objects is exposed to the page in a request- scoped attribute called results. Additionally,an empty java.util.HashMap called resultMap is placed in the page scope. A JSP page needs to add the firstentry in results to resultMap, storing the name attribute of the bean as the key and the score attribute of thebean as the value. Which code snippet of JSTL code satisfies this requirement?()
A

${resultMap[results[0].name] = results[0].score}

B

<c:set var=${resultMap} key=${results[0].name} value=${results[0].score} />

C

<c:set var=resultMap property=${results[0].name}> ${results[0].value}</c:set>

D

<c:set var=resultMap property=${results[0].name} value=${results[0].score} />

E

<c:set target=${resultMap} property=${results[0].name} value=${results[0].score} />


相似考题
参考答案和解析
正确答案: E
解析: 暂无解析
更多“单选题Assume a JavaBean com.example.GradedTestBean exists and has two attributes. The attribute name is oftype java.lang.String and the attribute score is of type java.lang.Integer. An array of com.example. GradedTestBean objects is exposed to the page in a ”相关问题
  • 第1题:

    Assume a JavaBean com.example.GradedTestBean exists and has two attributes. The attribute name is oftype java.lang.String and the attribute score is of type java.lang.Integer. An array of com.example. GradedTestBean objects is exposed to the page in a request- scoped attribute called results. Additionally,an empty java.util.HashMap called resultMap is placed in the page scope. A JSP page needs to add the firstentry in results to resultMap, storing the name attribute of the bean as the key and the score attribute of thebean as the value. Which code snippet of JSTL code satisfies this requirement?()

    • A、${resultMap[results[0].name] = results[0].score}
    • B、<c:set var="${resultMap}" key="${results[0].name}" value="${results[0].score}" />
    • C、<c:set var="resultMap" property="${results[0].name}"> ${results[0].value}</c:set>
    • D、<c:set var="resultMap" property="${results[0].name}" value="${results[0].score}" />
    • E、<c:set target="${resultMap}" property="${results[0].name}" value="${results[0].score}" />

    正确答案:E

  • 第2题:

    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

  • 第3题:

    You have a use case in your web application that adds several session-scoped attributes. At the end of theuse case, one of these objects, the manager attribute, is removed and then it needs to decide which of theother session-scoped attributes to remove. How can this goal be accomplished?()

    • A、The object of the manager attribute should implement the HttpSessionBindingListener and it should call the removeAttribute method on the appropriate session attributes.
    • B、The object of the manager attribute should implement the HttpSessionListener and it should call the removeAttribute method on the appropriate session attributes.
    • C、The object of the manager attribute should implement the HttpSessionBindingListener and it should call the deleteAttribute method on the appropriate session attributes.
    • D、The object of the manager attribute should implement the HttpSessionListener and it should call the deleteAttribute method on the appropriate session attributes.

    正确答案:A

  • 第4题:

    Consider the Mysql Enterprise Audit plugin. Which statement is true when you identify a connection event that has used external authentication?()

    • A、The attribute "STATUS" is set to the string EXTERNAL_AUTH
    • B、The attribute "PRIV_USER" contains the username
    • C、The event type that is given in the attribute "NAME" is EXTERNAL_AUTH
    • D、There is no differentiation between native and external authentication events
    • E、External authentication is managed through external auditing logs
    • F、The "PROXY_PRIV" user shows a username if external authentication is used

    正确答案:E

  • 第5题:

    You write a logging function for a Web Form. You call the logging function from the Page_Unload event handler. You test the Web Form and notice that the Page_Unload event handler does not call the logging function. You need to ensure that the logging function is called. What are two possible ways to achieve this goal? ()

    • A、Set the Page attribute to AutoEventWireup="False". Remove the attribute onunload="Page_Unload" from the Web Form element.
    • B、Set the Page attribute to AutoEventWireup="False". Add the attribute OnUnload="Page_Unload" to the Web Form element.
    • C、Set the Page attribute to AutoEventWireup="False". Add the Web Form attribute autocomplete=on.
    • D、Set the Page attribute to AutoEventWireup="True".

    正确答案:B,D

  • 第6题:

    You modify an existing Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.  You add a theme to the ASP.NET application.  You need to apply the theme to override any settings of individual controls.  What should you do?()

    • A、In the Web.config file of the application,set the Theme attribute of the pages element to the name of the theme.
    • B、In the Web.config file of the application,set the StyleSheetThemeattribute of the pages element to the name of the theme.
    • C、Add a master page to the application. In the @Master directive,set the Theme attribute to the name of the theme.
    • D、Add a master page to the application. In the @Master directive,set the StyleSheetTheme attribute to the name of the theme.

    正确答案:A

  • 第7题:

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

  • 第8题:

    单选题
    Which XSL if statement checks for the existence of a homepage attribute within an STS Universal User XML structure?()
    A

    <xsl:if test=//stsuuser:AttributeList/stsuuser:Attribute[attr='homepage']>

    B

    <xsl:if test=//stsuuser:AttributeList/stsuuser:Attribute[@name='homepage']>

    C

    <xsl:if-exists=//stsuuser:AttributeList/stsuuser:Attribute/custom:Homepage>

    D

    <xsl:if-exists=//stsuuser:AttributeList/stsuuser:Attribute[@name='homepage'])>


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

  • 第9题:

    单选题
    Assume a JavaBean com.example.GradedTestBean exists and has two attributes. The attribute name is oftype java.lang.String and the attribute score is of type java.lang.Integer. An array of com.example. GradedTestBean objects is exposed to the page in a request- scoped attribute called results. Additionally,an empty java.util.HashMap called resultMap is placed in the page scope. A JSP page needs to add the firstentry in results to resultMap, storing the name attribute of the bean as the key and the score attribute of thebean as the value. Which code snippet of JSTL code satisfies this requirement?()
    A

    ${resultMap[results[0].name] = results[0].score}

    B

    <c:set var=${resultMap} key=${results[0].name} value=${results[0].score} />

    C

    <c:set var=resultMap property=${results[0].name}> ${results[0].value}</c:set>

    D

    <c:set var=resultMap property=${results[0].name} value=${results[0].score} />

    E

    <c:set target=${resultMap} property=${results[0].name} value=${results[0].score} />


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

  • 第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,E
    解析: 暂无解析

  • 第11题:

    多选题
    Given that a scoped attribute cart exists only in a user’s session, which two,taken independently,ensurethe scoped attribute cart no longer exists?()
    A

    ${cart = null}

    B

    <c:remove var=cart />

    C

    <c:remove var=${cart} />

    D

    <c:remove var=cart scope=session />

    E

    <c:remove scope=session>cart</c:remove>


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

  • 第12题:

    单选题
    You modify an existing Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.  You add a theme to the ASP.NET application.  You need to apply the theme to override any settings of individual controls.  What should you do?()
    A

    In the Web.config file of the application,set the Theme attribute of the pages element to the name of the theme.

    B

    In the Web.config file of the application,set the StyleSheetThemeattribute of the pages element to the name of the theme.

    C

    Add a master page to the application. In the @Master directive,set the Theme attribute to the name of the theme.

    D

    Add a master page to the application. In the @Master directive,set the StyleSheetTheme attribute to the name of the theme.


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

  • 第13题:

    Which XSL if statement checks for the existence of a homepage attribute within an STS Universal User XML structure?()

    • A、<xsl:if test="//stsuuser:AttributeList/stsuuser:Attribute[attr='homepage']">
    • B、<xsl:if test="//stsuuser:AttributeList/stsuuser:Attribute[@name='homepage']">
    • C、<xsl:if-exists="//stsuuser:AttributeList/stsuuser:Attribute/custom:Homepage">
    • D、<xsl:if-exists="//stsuuser:AttributeList/stsuuser:Attribute[@name='homepage'])>

    正确答案:B

  • 第14题:

    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

  • 第15题:

    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

  • 第16题:

    You are implementing an ASP.NET MVC 2 Web application that contains several folders. The Views/Shared/DisplayTemplates folder contains a templated helper named Score.ascx that performs custom formatting of integer values.  The Models folder contains a class named Player with the following definition.Public Class Player   Public Property Name As String   Public Property LastScore As IntegerPublic Property HighScore As IntegerEnd Class  You need to ensure that the custom formatting is applied to LastScore values when the HtmlHelper.DisplayForModel method is called for any view in the application that has a model of type Player. What should you do?()

    • A、Rename Score.ascx to LastScore.ascx.
    • B、Move Score.ascx from the Views/Shared/DisplayTemplates folder to the Views/Player/DisplayTemplates folder.
    • C、Add the following attribute to the LastScore property. <UIHint("Score")>
    • D、Add the following attribute to the LastScore property. <Display(Name:="LastScore", ShortName:="Score")>

    正确答案:C

  • 第17题:

    You need to meet the requirements of the accounts team. What should you do?()

    • A、Set the Dimension type to Currency.
    • B、Set the Currency member name as a unique attribute.
    • C、Hide non-leaf data within the Currency dimension key attribute.
    • D、Disable the All member of the Currency dimension key attribute.

    正确答案:D

  • 第18题:

    单选题
    Assume a JavaBean com.example.GradedTestBean exists and has two attributes. The attribute name is oftype java.lang.String and the attribute score is of type java.lang.Integer. An array of com.example. GradedTestBean objects is exposed to the page in a request- scoped attribute called results. Additionally,an empty java.util.HashMap called resultMap is placed in the page scope. A JSP page needs to add the firstentry in results to resultMap, storing the name attribute of the bean as the key and the score attribute of thebean as the value. Which code snippet of JSTL code satisfies this requirement?()
    A

    ${resultMap[results[0].name] = results[0].score}

    B

    <c:set var=${resultMap} key=${results[0].name} value=${results[0].score} />

    C

    <c:set var=resultMap property=${results[0].name}> ${results[0].value}</c:set>

    D

    <c:set var=resultMap property=${results[0].name} value=${results[0].score} />

    E

    <c:set target=${resultMap} property=${results[0].name} value=${results[0].score} />


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

  • 第19题:

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

  • 第20题:

    单选题
    You are implementing an ASP.NET MVC 2 Web application that contains several folders. The Views/Shared/DisplayTemplates folder contains a templated helper named Score.ascx that performs custom formatting of integer values.  The Models folder contains a class named Player with the following definition.Public Class Player   Public Property Name As String   Public Property LastScore As IntegerPublic Property HighScore As IntegerEnd Class  You need to ensure that the custom formatting is applied to LastScore values when the HtmlHelper.DisplayForModel method is called for any view in the application that has a model of type Player. What should you do?()
    A

    Rename Score.ascx to LastScore.ascx.

    B

    Move Score.ascx from the Views/Shared/DisplayTemplates folder to the Views/Player/DisplayTemplates folder.

    C

    Add the following attribute to the LastScore property. <UIHint(Score)>

    D

    Add the following attribute to the LastScore property. <Display(Name:=LastScore, ShortName:=Score)>


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

  • 第21题:

    单选题
    You have a use case in your web application that adds several session-scoped attributes. At the end of theuse case, one of these objects, the manager attribute, is removed and then it needs to decide which of theother session-scoped attributes to remove. How can this goal be accomplished?()
    A

    The object of the manager attribute should implement the HttpSessionBindingListener and it should call the removeAttribute method on the appropriate session attributes.

    B

    The object of the manager attribute should implement the HttpSessionListener and it should call the removeAttribute method on the appropriate session attributes.

    C

    The object of the manager attribute should implement the HttpSessionBindingListener and it should call the deleteAttribute method on the appropriate session attributes.

    D

    The object of the manager attribute should implement the HttpSessionListener and it should call the deleteAttribute method on the appropriate session attributes.


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

  • 第22题:

    单选题
    Consider the Mysql Enterprise Audit plugin. Which statement is true when you identify a connection event that has used external authentication?()
    A

    The attribute STATUS is set to the string EXTERNAL_AUTH

    B

    The attribute PRIV_USER contains the username

    C

    The event type that is given in the attribute NAME is EXTERNAL_AUTH

    D

    There is no differentiation between native and external authentication events

    E

    External authentication is managed through external auditing logs

    F

    The PROXY_PRIV user shows a username if external authentication is used


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

  • 第23题:

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

  • 第24题:

    单选题
    You need to meet the requirements of the accounts team. What should you do?()
    A

    Set the Dimension type to Currency.

    B

    Set the Currency member name as a unique attribute.

    C

    Hide non-leaf data within the Currency dimension key attribute.

    D

    Disable the All member of the Currency dimension key attribute.


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