posted 20 years ago
hello,
when using LookupDispatchAction i am getting the foll compile time error.
the Action class should be declared abstract since it does not define getKeyMethodMap() present in LookupDispatchAction even though it is present.
My RegGroupClass.jsp has the following "submit"
<html:submit property="submit">
<bean:message key="button.add"/>
</html:submit>
My struts-config action-mapping is as follows.
<action path="/ConfirmAddGroupClass"
type="Group.GroupClassAction"
name="GroupClassActionForm"
scope="request"
input="/GroupClass/RegGroupClass.jsp"
parameter="submit"/>
My GroupClassAction class is as follows.
public class GroupClassAction extends LookupDispatchAction{
Map getKeyMethodMap(ActionMapping mapping,
ActionForm form,
HttpServletRequest request) {
Map map = new HashMap();
System.out.println("in mapping");
map.put("button.add", "add");
return map;
}
public ActionForward add(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException {
// do add
System.out.println("before forward");
return mapping.findForward("ConfirmAddGroupClass");
}
}
Can anyone plz guide me through this.
thanks in advance
Sana