Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Problem compiling LookupDispatchAction

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • 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
  • 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
 
What a stench! Central nervous system shutting down. Save yourself tiny ad!
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
    Bookmark Topic Watch Topic
  • New Topic