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> 展开
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> 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询