本人写了这样一段代码,一直报 not bean .....错误!<html:form action="list.do">
<html:select property="list">
<html:options connection="datas" property="value" labelproperty="txt">
</html:select>
</html:form>beanForm 里面用的get/set list
datas 是Action里面通过request.setAttribute("datas",al)传到JSP的值;
al为一ArrayList集合.
al集合存放的是数据对象类 里面有方法get/set  value 和get/set txt怎样才能将ArrayList里面的值利用<html:select>循环显示出来.

解决方案 »

  1.   

    把<html:options connection="datas" property="value" labelproperty="txt">
    改成<html:options collection="datas" property="value" labelproperty="txt" />
    试一下平时都是这样用的,如果有把datas扔到request的话没出现not bean found错误
      

  2.   

    楼主你好,这样试试
    <html:form action="list.do">
    <html:select name="form1" property="list">
    <html:options name="form1" property="value" labelproperty="txt">
    </html:select>
    </html:form>
    其中form是你的action所对应的formbean的名字,list是你formbean中要接受value值的form,这样就可以把select选中的txt所对应的value值提交到form 中.