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

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

WBOY
WBOYOriginal
2016-06-21 09:11:541498browse

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


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


回复讨论(解决方案)

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

javax.servlet.jsp.el.ImplicitObjectELResolver$ScopeMap$ScopeEntry@d1c47ede

换个变量名字,别用header

Statement:
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