black

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 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}" />

相关考题

多项选择题 WhichtwoaretrueabouttheJSTLcoreiterationcustomtags?()

单项选择题 Click the Exhibit button. Assuming the tag library in the exhibit is imported with the prefix stock,which custom tag invocation outputsthe contents of the variable exposed by the quote tag?()

单项选择题 A JSP page contains a taglib directive whose uri attribute has the value dbtags. Which XML element withinthe web application deployment descriptor defines the associated TLD?()

All Rights Reserved 版权所有©PP题库网库(pptiku.com)

备案号:湘ICP备14005140号-5

经营许可证号:湘B2-20140064