I defined an entity java. public class Bed { private String bed_id; public String getBed_id() {return bed_id;} public void setBed_id(String bed_id) { this.bed_id=bed_id; } } in action file, i did the following, public class Analysis_input extends ActionSupport { private ArrayList<Bed> beds; public String execute() throws Exception { ......../ * initialized service...and it is database connection */ beds=service.Beds(); ActionContext.getContext().getSession().put("Beds",beds); return SUCCESS; } public void setBeds(ArrayList<Bed> beds){ this.beds = beds; } public ArrayList<Bed> getBeds() { return beds; } } in jsp file, i did <s:checkboxlist name="beds" list="beds" /> but received the error FreeMarker template error! Error on line 28, column 13 in template/simple/checkboxlist.ftl stack.findValue(parameters.listKey) is undefined. It cannot be assigned to itemKey The problematic instruction: ==> assignment: itemKey=stack.findValue(parameters.listKey) [on line 28, column 13 in template/simple/checkboxlist.ftl] in user-directive s.iterator [on line 25, column 5 in template/simple/checkboxlist.ftl] in include "/${parameters.templateDir}/simple/checkboxlist.ftl" [on line 25, column 1 in template/xhtml/checkboxlist.ftl] if i change the jsp file to the following <s:iterator value="beds" status="st"> <s:checkbox name="beds" value="bed_id"></s:checkbox><br> </s:iterator> but receive the new error
<!--StartFragment-->Error on line 28, column 13 in template/simple/checkboxlist.ftl stack.findValue(parameters.listKey) is undefined. It cannot be assigned to itemKey The problematic instruction: ---------- ==> assignment: itemKey=stack.findValue(parameters.listKey) [on line 28, column 13 in template/simple/checkboxlist.ftl] in user-directive s.iterator [on line 25, column 5 in template/simple/checkboxlist.ftl] in include "/${parameters.templateDir}/simple/checkboxlist.ftl" [on line 25, column 1 in template/xhtml/checkboxlistany expert can give me the advise? i am new to struts 2tks in advancejohn