<select name="kindid">
<option selected="selected">
--选择--
</option>
<logic:present name="newscolumn" scope="request">
<logic:iterate id="list" name="newscolumn" property="list" >
<option value="<bean:write name="list" property="id"/>">
<bean:write name="list" property="kindname" />
</option>
<option value="0">
---------
</option>
</logic:iterate>
</logic:present>
</select>
类newsColumn
public class newsColumn {
private List list=new ArrayList();
public newsColumn(){
CfpfColumnDAO cdao=new CfpfColumnDAO();
this.list=cdao.findAll();
}
public List getList() {
return list;
}
public void setList(List list) {
this.list = list;
}
}
继承Action类中的方法
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) {
ArticleForm ArticleForm = (ArticleForm) form;// TODO Auto-generated
// method stub
request.setAttribute("newscolumn", new newsColumn());
return mapping.findForward("admin/articleadd");
}