struts , jsp问题:javax.servlet.…

来源:互联网 发布:换算货币软件 编辑:程序博客网 时间:2024/06/10 19:31

action 中
List wardList = wardDAOIface.findAll();
request.setAttribute("wardList", wardList);
jsp中
<body>
<html:select style="width:200"property="${ward}">
<html:optionsCollection property="${wardList}"value="ward" label="ward" />
</html:select>
</body>
报错:javax.servlet.jsp.JspException: Cannot find bean under nameorg.apache.struts.taglib.html.BEAN

 

原因:<html:select/>  必需用在<html:form/>标签中

例如:

<html:form action="kkkkkk.do" 

<html:selectstyle="width:200"property="${ward}" 

<html:optionsCollectionproperty="${wardList}"value="ward"label="ward" />   

</html:select >  

</html:form> 

0 0
原创粉丝点击