jsp里:
<html:select property="userid">
<html:options collection="userHtmlSelect" property="value" labelProperty="label"/>
</html:select>
ActionForm 里:
private java.lang.String userid="admin"; //默认值
Action里:
form.setUserid("guest");//修改默认值
//设置下拉选项
List rs = new java.util.ArrayList();
rs.add(new org.apache.struts.util.LabelValueBean("管理员",
"admin"));
rs.add(new org.apache.struts.util.LabelValueBean("客人","guest"));
request.getSession().setAttribute("userHtmlSelect",rs);
return mapping.findForward("index");