<html:form action="/department.do?method=addDep" method="post">
<html:select property="dep_id" >
<html:options collection="list" labelProperty="depName" property="dep_id" />
</html:select>
<input type="submit" value="submit">
</html:form>
public class DepartmentForm extends ActionForm {
private static final long serialVersionUID = -7999273122578907163L;
private Integer dep_id;
private String depName;
private Integer depState;
public Integer getDep_id() {
return dep_id;
}
public void setDep_id(Integer dep_id) {
this.dep_id = dep_id;
}
public String getDepName() {
return depName;
}
public void setDepName(String depName) {
this.depName = depName;
}
public Integer getDepState() {
return depState;
}
public void setDepState(Integer depState) {
this.depState = depState;
}
@Override
public void reset(ActionMapping mapping, HttpServletRequest request) {
// TODO Auto-generated method stub
super.reset(mapping, request);
}
@Override
public ActionErrors validate(ActionMapping mapping,
HttpServletRequest request) {
// TODO Auto-generated method stub
return super.validate(mapping, request);
}
}