可以。先将数据读取出来将每个元素存入一个List中。像这样List1.add(new org.apache.struts.util.LabelValueBean(rs1.getString("Depart_Name"),rs1.getString("Depart_Name")));再存入session。再在页面中的用 <html:select property="属性名">
<html:options collection="集合名" property="value" labelProperty="label"/>
</html:select>
其中“集合名”就是存入的session
<html:options collection="集合名" property="value" labelProperty="label"/>
</html:select>
其中“集合名”就是存入的session
String[] label = {"-:Month:-","January","February","March","April","May","June",
"July","August","September","October","November","December"};List<HashMap<String, String>> list = new ArrayList<HashMap<String, String>>();
HashMap<String, String> map = null;
for(int i=0;i<13;i++){
map = new HashMap<String, String>();
map.put("value", value[i]);
map.put("label", label[i]);
list.add(map);
}
request.setAttribute("monthList", list);<html:select property="month">
<html:options collection="monthList" property="value" labelProperty="label"/>
</html:select>
<select name="selectMonth">
<option value="00" selected>-:Month:-</option>
<option value="01">January</option>
<option value="02">February</option>
<option value="03">March</option>
<option value="04">April</option>
<option value="05">May</option>
<option value="06">June</option>
<option value="07">July</option>
<option value="08">August</option>
<option value="09">September</option>
<option value="10">October</option>
<option value="11">November</option>
<option value="12">December</option>
</select>