Property 'name' not found on type java.lang.String

来源:互联网 发布:台湾人淘宝购物 编辑:程序博客网 时间:2024/05/29 09:29

报错误: Property 'name' not found on type java.lang.String

错误写法:

for:Each 中items属性的ER表达式书写错误,此博客不能贴 c标签,遗憾了,有什么方法贴出来.告诉我下啊....?????

 

<c:forEach items="categories" var="category" &rt;
      <html:option value="${category.name}" key="categoryName"></html:option> 
     </c:forEach>  

 

正确写法:

<c:forEach items="${requestScope[categories]}" var="category" >
      <html:option value="${category.name}" key="categoryName"></html:option> 
     </c:forEach> 

 

 

 

原创粉丝点击