试题详情
- 单项选择题 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
关注下方微信公众号,在线模考后查看
热门试题
- Which statement
- What can d
- 以下函数中,不是Object类所有的是(
- 已知: 则输出为()?
- public class&e
- 1. public&ensp
- Which two
- 考虑下面这个简单的例子,让我们看看ref
- 下面代码的输出结果是什么()。
- Upon a u
- 1.public class Test
- 任意输入一个正整数,判断其是否是多因子完
- String foo&ens
- 1. class
- 1. public&ensp
- 1. package&ens
- System.out.format(&
- 什么是接口?为什么要定义接口?接口与类有
- 已知: 则输出为()
- 有哺乳动物类mammal,将其作为父类,