| Author |
Problem in calling a method in my Action
|
Ramesh Jothimani
Ranch Hand
Joined: May 05, 2011
Posts: 40
|
|
I have a method named handleReportUpdate() in my ReportsConfigurationAction.java . When I try to call handleReportUpdate , I am getting error as ,
java.lang.NoSuchMethodException: com.tcs.admin.actions.ReportsConfigurationAction.handleReportUpdate(org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
at java.lang.Class.getMethod(Class.java:1605)
at org.apache.struts.actions.DispatchAction.getMethod(DispatchAction.java:334)
at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:266)
at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:216)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
The Method is as follows :
The entry in struts-config file is as follows :
I am calling the handleReportUpdate() as follows :
/reportsconfig.do?parameter=handleReportUpdate
Please help me to solve the issue . Thanks !
|
 |
Vivek Kanodia
Greenhorn
Joined: Apr 27, 2012
Posts: 6
|
|
You are probably getting the Exception because the method expected is
public ActionForward execute(ActionMapping mapping,
ActionForm form,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.lang.Exception. Just try changing the method name and it might solve your problem.
|
 |
Ramesh Jothimani
Ranch Hand
Joined: May 05, 2011
Posts: 40
|
|
I have changed
to
So the method handleReportUpdate() requires ActionForm in the parameter. I have passed ActionForm in function parameter & it is working fine now.
Thanks !
|
 |
 |
|
|
subject: Problem in calling a method in my Action
|
|
|