代码里是这样写的
SalPlan plan=this.PlanService.findPlanById(id);
request.setAttribute("planByid", plan);页面时
<logic:iterate id="item" name="planByid" type="com.accp.crm.entity.SalPlan">
<tr>
<td class="list_data_text"><bean:write name="item" property="plaDate" format="yyyy年MM月dd日" /> </td>
</tr>
</logic:iterate>运行时会报Cannot find bean: "planByid" in any scope错误
应该怎样改
SalPlan plan=this.PlanService.findPlanById(id);
request.setAttribute("planByid", plan);页面时
<logic:iterate id="item" name="planByid" type="com.accp.crm.entity.SalPlan">
<tr>
<td class="list_data_text"><bean:write name="item" property="plaDate" format="yyyy年MM月dd日" /> </td>
</tr>
</logic:iterate>运行时会报Cannot find bean: "planByid" in any scope错误
应该怎样改
也可能这个值本身就是null的
把那个request里面的拿出来试试?
改为Session session=request.getSession();
session.setAttribute("planByid",plan)
因为页面被重置了
参考: http://hi.baidu.com/%D3%D2%CA%D6%C4%AA%D4%FA%CC%D8%B5%C4/blog/item/6829303618c20d340a55a985.html