<%
Depts dept=new Depts();
dept.setId(1);
dept.setName("技术部");
Depts dept1=new Depts();
dept1.setId(2);
dept1.setName("财务部");
List<Depts> list=new ArrayList<Depts>();
list.add(dept);
list.add(dept1);
request.setAttribute("dept",dept);
%>
<html:select property="id"> //为什么老提示这行Cannot find bean under name org.apache.struts.taglib.html.BEAN property属性设置的值不是bean里的属性吗
<html:option value="0">--请选择--</html:option>
<html:optionsCollection name="dept" value="id" label="name"/>
</html:select>
Depts dept=new Depts();
dept.setId(1);
dept.setName("技术部");
Depts dept1=new Depts();
dept1.setId(2);
dept1.setName("财务部");
List<Depts> list=new ArrayList<Depts>();
list.add(dept);
list.add(dept1);
request.setAttribute("dept",dept);
%>
<html:select property="id"> //为什么老提示这行Cannot find bean under name org.apache.struts.taglib.html.BEAN property属性设置的值不是bean里的属性吗
<html:option value="0">--请选择--</html:option>
<html:optionsCollection name="dept" value="id" label="name"/>
</html:select>
解决方案 »
- response
- sql关于日期的一个问题
- struts的validate验证问题,请大家帮忙!
- xfire中INOUT参数如何传入
- SSH的一个奇怪的问题....
- 用struts 中的validation,死活不肯验证啊,求助啊,急死了
- 求 在Eclipse在配置Struts的例子。。 人都死了?
- org.apache.jasper.JasperException: java.lang.ClassCastException: org.apache.stru
- TOMCAT5中配置JNDI的问题!请教!
- 一个J2EE应用需要同客户端保持一个安全的(SSL/HTTPS)长连接,请问此部分的代码应该用什么J2EE component来实现,Session EJB or Servle
- spring+hibernate延时加载问题
- Struts包和源代码
------>request.setAttribute("dept",list);
property对应的是form对应的action,对应的formBean里的属性名称,你找找看formBean里有这个id属性没?