Hi,
Following code i had used to poplulate a combo box using a collection of beans may be this can help you.
Here struts-html tag has been used. Include the struts-html.jar to your project and following lint to your jsp page.
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
In the code property="pvob" is name specified in form the bean for the combo box . Using its getter and setter methods (setPvob,getPvob) the select value of combobox can be accessed in action class.
eg:
Here name="trileadActionForm" is the name of form bean as specified in struts-config.xml.
property="pvobList" is name of collection as specified in form bean.
eg:
Here value="pvobName" is member of bean class whose object are contained in the arraylist.
eg:
public class PVOB {
String pvobName;
public String getPvobName() {
return pvobName;
}
public void setPvobName(String pvobName) {
this.pvobName = pvobName;
}
}
For properties in form bean provide a getter setter method.