在中显示值环形
我正在使用 Spring MVC 3。从我的控制器中,我
mav = new ModelAndView();
mav.setViewName("reports");
mav.addObject("ReportList", ReportList);
return mav;
在 JSP
<c:forEach var="list" items="${ReportList}">
$(list.name)
</c:forEach>
ReportList 中设置值,其大小为 7。ReportList 是 Report 类的列表以 name 作为实例,并具有适当的 getter 和 setter。
当我在浏览器中运行它时,它显示 $(list.name)
7 次。
它不显示正确的名称。
I am using Spring MVC 3. From my controller I set value
mav = new ModelAndView();
mav.setViewName("reports");
mav.addObject("ReportList", ReportList);
return mav;
In JSP
<c:forEach var="list" items="${ReportList}">
$(list.name)
</c:forEach>
ReportList has a size of 7. ReportList is a list of Report class having name as instance with proper getters and setters.
When I run it in browser it displays $(list.name)
7 times.
Its not displaying proper names.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
这些括号:{ }
These brackets: { }
它应该是
${list.name}
...It should be
${list.name}
...您应该使用
标记来呈现name
属性的值。#{list.name}
也可能有效(将(
替换为{
)。You should use the
<c:out>
tag to render the value of thename
attribute.#{list.name}
might work as well (replace(
with{
).