public ActionForward execute(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response) {
// 入力フォームを取得
DynaActionForm inform = (DynaActionForm)form;
// Stringデータの取得
String[] stringData = (String[])inform.get("stringData");
System.out.println("stringData(" + stringData[0] + ")");
// Mapデータの設定
HashMap<String,String> mapData = new HashMap<String,String>();
mapData.put("map_key1", "map01");
mapData.put("map_key2", "map02");
mapData.put("map_key3", "map02");
inform.set("mapData",mapData);
// Listデータの設定
ArrayList<String> listData = new ArrayList<String>();
listData.add("list01");
listData.add("list02");
listData.add("list03");
inform.set("listData",listData);
return mapping.findForward("success");
}
|