SCWCD(310-083)

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

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

第1题:

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,D

第2题:

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

第3题:

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

第4题:

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

第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题:

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

第7题:

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

第8题:

WhichXSLifstatementchecksfortheexistenceofahomepageattributewithinanSTSUniversalUserXMLstructure?()

A.<xsl:iftest="//stsuuser:AttributeList/stsuuser:Attribute[attr=‘homepage‘]">

B.<xsl:iftest="//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题:

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

第10题:

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

更多相关问题