Cannot find bean: "list" in any scope 10

Cannotfindbean:"list"inanyscopeatorg.apache.struts.taglib.TagUtils.lookup(TagUtils.ja... Cannot find bean: "list" in any scope
at org.apache.struts.taglib.TagUtils.lookup(TagUtils.java:935)
at org.apache.struts.taglib.logic.IterateTag.doStartTag(IterateTag.java:232)
at org.apache.jsp.list_jsp._jspService(list_jsp.java:135)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:386)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:595)
这个是我的页面<html:form action="/house" method="post">
<html:hidden property="param" name="houseForm" value="toList"/>
<table>
<logic:iterate id="kHouse" name="list">
<tr><td> ${kHouse.KProduceName } </td><td> ${kHouse.KProduceType } </td> <td> ${kHouse.KProduceNumber } </td><td> ${kHouse.KProducePrice } </td>
<td> ${kHouse.KProduceBaoNumber } </td> <td> ${kHouse.KProduceBaoType } </td> </tr></logic:iterate> </table> </html:form>

Action方法
public ActionForward toList(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) {
HttpSession session=request.getSession();
List list= this.kHouseBiz.HouseAll(); session.setAttribute("list", list); return null;}

struts配置文件
<action attribute="houseForm" name="houseForm" parameter="param" path="/house" scope="request"
type="com.cn.struts.action.HouseAction">
<forward name="list" path="/houseList.jsp" />
</action>
展开
 我来答
liyaming_liym
2011-04-22 · TA获得超过1222个赞
知道小有建树答主
回答量:525
采纳率:0%
帮助的人:313万
展开全部
首先确定你的页面是直接访问的,还是通过Action转到页面的。在我看来,你应该是直接访问页面了吧,没有通过Action,所以你Action里的session.setAttribute("list",list);这句话是没有执行的,也就是说你的session作用域内是不存在list这个集合的。还一个,你的Action里,最后怎么会return null呢?
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式