• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Problem compiling LookupDispatchAction

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Sana Jay
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hello,
Sorry for the inane question.Just found out the answer.The signature of the getKeyMethodMap() did not match with the one in my ActionClass.
thanks,
Sana
 
I'm thinking about a new battle cry. Maybe "Not in the face! Not in the face!" Any thoughts tiny ad?
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic