R
Ritchie
I am getting the following error when trying to press all my buttons
on my jsp. I am using the Struts framework and taking advance of
using LookupDispatchAction class since I want many actions in my HTML
form.
SEVERE: Action[/submit] does not contain method named query
**************
JSP file
**************
<html:submit property="method">
<bean:message key="button.query" />
</html:submit>
<html:submit property="method">
<bean:message key="button.change" />
</html:submit>
******************
Struts-config.xml
******************
<action-mappings type="org.apache.struts.action.ActionMapping">
<!-- Static pages -->
<action path="/submit"
type="ca.halifax.internal.phonebook.controller.PhoneAction"
name="phoneform" scope="request" input="phonescreen.jsp"
parameter="method" validate="false">
<forward name="success" path="phonescreen.jsp" />
</action>
*********************
Action class
*********************
public final class PhoneAction extends LookupDispatchAction {
private ActionForward query(ActionMapping mapping,
ActionForm actionForm, HttpServletRequest request,
HttpServletResponse response) {
System.out.println("Performing Query operation");
return mapping.findForward("success");
}
....
protected Map getKeyMethodMap() {
Map map = new HashMap();
System.out.println("Inside the Mapping method");
map.put("button.query", "query");
map.put("button.change", "save");
map.put("button.first", "first");
map.put("button.previous", "previous");
map.put("button.next", "next");
map.put("button.last", "last");
map.put("button.delete", "delete");
map.put("button.add", "add");
return map;
}
Can anyone shed some light on why I am getting this error?
Thanks
Ritchie
on my jsp. I am using the Struts framework and taking advance of
using LookupDispatchAction class since I want many actions in my HTML
form.
SEVERE: Action[/submit] does not contain method named query
**************
JSP file
**************
<html:submit property="method">
<bean:message key="button.query" />
</html:submit>
<html:submit property="method">
<bean:message key="button.change" />
</html:submit>
******************
Struts-config.xml
******************
<action-mappings type="org.apache.struts.action.ActionMapping">
<!-- Static pages -->
<action path="/submit"
type="ca.halifax.internal.phonebook.controller.PhoneAction"
name="phoneform" scope="request" input="phonescreen.jsp"
parameter="method" validate="false">
<forward name="success" path="phonescreen.jsp" />
</action>
*********************
Action class
*********************
public final class PhoneAction extends LookupDispatchAction {
private ActionForward query(ActionMapping mapping,
ActionForm actionForm, HttpServletRequest request,
HttpServletResponse response) {
System.out.println("Performing Query operation");
return mapping.findForward("success");
}
....
protected Map getKeyMethodMap() {
Map map = new HashMap();
System.out.println("Inside the Mapping method");
map.put("button.query", "query");
map.put("button.change", "save");
map.put("button.first", "first");
map.put("button.previous", "previous");
map.put("button.next", "next");
map.put("button.last", "last");
map.put("button.delete", "delete");
map.put("button.add", "add");
return map;
}
Can anyone shed some light on why I am getting this error?
Thanks
Ritchie