在我的动作课上
public class MyAction extends ActionSupport {
private Map<String, String> map;
public String execute() throws Exception {
map = new HashMap<String, String>();
map.put("abc", "abc");
map.put("xyz", "xyz");
return SUCCESS;
}
}
Run Code Online (Sandbox Code Playgroud)
对于映射到成功的jsp,使用这样的东西
<s:select list = "map" name = "name" label = "Name" headerKey="" headerValue = "Enter Value"/>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
15797 次 |
| 最近记录: |