1. XXXAction.java
private List<Map<String, String>> maptest = null; public List<Map<String, String>> getMaptest() { return maptest; } public void setMaptest(List<Map<String, String>> maptest) { this.maptest = maptest; } public String maptest(){ maptest = new ArrayList<Map<String, String>>(); Map<String, String> map = new HashMap<String, String>(); map.put("id", "1"); map.put("name", "dept1"); maptest.add(map); map = new HashMap<String, String>(); map.put("id", "2"); map.put("name", "dept2"); maptest.add(map); return SUCCESS; } 2. On the test.jsp page
<s:select list="maptest" listKey="id" listValue="name"></s:select>
The content of the drop-down list can be displayed through the above form.
The above brief discussion on the use of map objects stored in the list in the s:select tag is all the content I share with you. I hope you can give you a reference and I hope you can support Wulin.com more.