package sample.ac;
import javax.servlet.http.*;
import java.util.*;
import org.apache.struts.action.*;
import org.apache.struts.actions.LookupDispatchAction;
public class LookupDispatchCheckAction extends LookupDispatchAction {
protected Map getKeyMethodMap() {
// キーとメソッドの対応を登録する
Map<String,String> map = new HashMap<String,String>();
map.put("button.dispatchA","lookupDispatchTestA");
map.put("button.dispatchB","lookupDispatchTestB");
return map;
}
public ActionForward lookupDispatchTestA(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response) {
System.out.println("lookupDispatchTestA 実行!!");
return mapping.findForward("successA");
}
public ActionForward lookupDispatchTestB(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response) {
System.out.println("lookupDispatchTestB 実行!!");
return mapping.findForward("successB");
} }
|