<c:foreach>标签,后台传过来的是String数组,前台出现的是内存地址。求解。_html/css_WEB-ITnose

WBOY
Release: 2016-06-21 09:11:54
Original
1554 people have browsed it

String[] header = new String[]{"产品分类","微生物污染","食品添加剂超标","污染物",					"非食用添加物","农兽残","生物毒素污染","转基因成分","辐照","禁限用物质",					"小计","其他不合格项目","包装不合格","标签不合格","有害生物","品质",					"证书不合格","总计"};
Copy after login


<c:forEach items="${header}" var="headerItem">		<th style="font-weight:bold;width:90;">${headerItem}</th></c:forEach>
Copy after login


回复讨论(解决方案)

前台输出的是一串内存地址:

javax.servlet.jsp.el.ImplicitObjectELResolver$ScopeMap$ScopeEntry@d1c47ede
Copy after login

换个变量名字,别用header

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template