The solution is to use LookupDispatchAction instead of DispatchAction as the former does not depend on javascript.
The problem: I had three buttons on my page — save, next and previous. When a user clicks a button, I set a variable called dispatch to corresponsing value using javascript. For save button, dispatch will be set to "save" and so on. I use javascript to do this. The DispatchAction would call the corresponding method based on the value of dispatch variable. The problem started when I disabled javascript. By default the dipatch was set to "error" value. Since I did not have a method named "error" in my DispatchAction, I was getting "methodnotfoundexception". HTH, Venkat >>> [EMAIL PROTECTED] 08/27/03 02:14PM >>> Venkat, What was the solution? -R -----Original Message----- From: Venkat Jambulingam [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 27, 2003 11:06 AM To: [EMAIL PROTECTED] Subject: RE: Validator and DispatchAction It works now. Thank you everyone for helping me. >>> [EMAIL PROTECTED] 08/27/03 12:58PM >>> Hi Steve, I don't have a method named "error" in my action class. I don't need one. Why is it looking for such a method in my action class? Help me please. I have to decide soon whether to go with validator framework or not. Thank you very much, Venkat >>> [EMAIL PROTECTED] 08/27/03 12:05PM >>> This is the relevant part of the message: "Action[/tr518page1] does not contain method named error" Does your DispatchAction class, com.ewd.biztax.actions.Tr518page1Action, contain a method named "error"? Steve http://www.ninsky.com/struts/ > -----Original Message----- > From: Venkat Jambulingam [mailto:[EMAIL PROTECTED] > Sent: August 27, 2003 8:43 AM > To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: Re: Validator and DispatchAction > > > Hi Nagi, > > Here is the error I'm getting while using validator with > DispatchAction: > > [ERROR] DispatchAction - -Action[/tr518page1] does not contain method > named error <java.lang.NoSuchMethodException: > error>java.lang.NoSuchMethodException: error > at java.lang.Class.getMethod0(Native Method) > at java.lang.Class.getMethod(Class.java:928) > at org.apache.struts.actions.DispatchAction.getMethod(DispatchAction. > java:334) > at > org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAc > tion.java:266) > at > org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:216) > at org.apache.struts.action.RequestProcessor.processActionPerform(Req > uestProcessor.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) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) > at com.ibm.servlet.engine.webapp.StrictServletInstance.doService(Serv > letManager.java:827) > at > com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(Stri > ctLifecycleServlet.java:167) > at > com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifec > ycleServlet.java:297) > at > com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(Stric > tLifecycleServlet.java:110) > at > com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManag > er.java:472) > at > com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch( > ServletManager.java:1012) > at > com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(Se > rvletManager.java:913) > at > com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebApp > Dispatch(WebAppRequestDispatcher.java:678) > at > com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(Web > AppRequestDispatcher.java:331) > at > com.ib m.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebA > ppRequestDispatcher.java:117) > at > com.ibm.servlet.engine.srt.WebAppInvoker.doForward(WebAppInvoker.java:134) > at com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebA > ppInvoker.java:239) > at > com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocatio > n(CachedInvocation.java:67) > at > com.ibm.servlet.engine.invocation.CacheableInvocationContext.invok > e(CacheableInvocationContext.java:106) > at > com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(S > ervletRequestProcessor.java:154) > at > com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(O > SEListener.java:315) > at > com.ibm.servlet.engine.http11.HttpConnection.handleRequest(HttpCon > nection.java:60) > at > com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection > .java:323) > at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:252) > at com.ibm.ws.util.CachedThread.run(ThreadPool.java:137) > > [8/27/03 11:16:41:759 EDT] 268bd254 WebGroup X SRVE0026E: [Servlet > Error]-[action]: com.ibm.servlet.engine.webapp.WebAppErrorReport: > Action[/tr518page1] does not contain method named error > at com.ibm.servlet.engine.webapp.WebAppDispatcherResponse.sendError(W > ebAppDispatcherResponse.java:93) > at > org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAc > tion.java:272) > at > org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:216) > at org.apache.struts.action.RequestProcessor.processActionPerform(Req > uestProcessor.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) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) > at com.ibm.servlet.engine.webapp.StrictServletInstance.doService(Serv > letManager.java:827) > at > com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(Stri > ctLifecycleServlet.java:167) > at > com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifec > ycleServlet.java:297) > at > com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(Stric > tLifecycleServlet.java:110) > at > com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManag > er.java:472) > at > com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch( > ServletManager.java:1012) > at > com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(Se > rvletManager.java:913) > at > com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebApp > Dispatch(WebAppRequestDispatcher.java:678) > at > com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(Web > AppRequestDispatcher.java:331) > at > com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebA > ppRequestDispatcher.java:117) > at > com.ibm.servlet.engine.srt.WebAppInvoker.doForward(WebAppInvoker.java:134) > at com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebA > ppInvoker.java:239) > at > com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocatio > n(CachedInvocation.java:67) > at > com.ibm.servlet.engine.invocation.CacheableInvocationContext.invok > e(CacheableInvocationContext.java:106) > at > com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(S > ervletRequestProcessor.java:154) > at > com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(O > SEListener.java:315) > at > com.ibm.servlet.engine.http11.HttpConnection.handleRequest(HttpCon > nection.java:60) > at > com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnectiona > .java:323) > at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:252) > at com.ibm.ws.util.CachedThread.run(ThreadPool.java:137) > > > Below are the details of my application: > > I have a wizard form interface. i.e. split a single form into four > pages as given below: > > tr518page1.jsp > tr518page2.jsp > tr518page3.jsp > tr518page4.jsp > > I have four actions corresponding to each jsp page as given below: > > Tr518page1Action.java > Tr518page2Action.java > Tr518page3Action.java > Tr518page4Action.java > > I have one ActionForm called Tr518Form.java. This form bean contains > the properties for all the four jsp pages. > > Below is the struts-config.xml file. ( I have removed unwanted portions > for clarity ) > > <struts-config> > > <form-beans> > <form-bean name="tr518Form" > type="com.ewd.biztax.forms.Tr518Form"></form-bean> > </form-beans> > > <action-mappings> > > <action name="tr518Form" input="tr518page1.jsp" path="/tr518page1" > scope="request" parameter="dispatch1" > type="com.ewd.biztax.actions.Tr518page1Action"> > <forward name="next" path="/tr518page2.jsp" /> > <forward name="exit" path="index.jsp" /> > </action> > > <action name="tr518Form" input="tr518page2.jsp" path="/tr518page2" > scope="request" parameter="dispatch2" > type="com.ewd.biztax.actions.Tr518page2Action"> > <forward name="next" path="/tr518page3.jsp" /> > <forward name="exit" path="index.jsp" /> > <forward name="previous" path="/tr518page1.jsp" /> > </action> > > <action name="tr518Form" input="tr518page3.jsp" path="/tr518page3" > scope="request" parameter="dispatch3" > type="com.ewd.biztax.actions.Tr518page3Action"> > <forward name="next" path="/tr518page4.jsp" /> > <forward name="exit" path="index.jsp" /> > <forward name="previous" path="/tr518page2.jsp" /> > </action> > > <action name="tr518Form" input="tr518page4.jsp" path="/tr518page4" > scope="request" parameter="dispatch4" > type="com.ewd.biztax.actions.Tr518page4Action"> > <forward name="next" path="schApage1.jsp" /> > <forward name="exit" path="index.jsp" /> > <forward name="previous" path="/tr518page3.jsp" /> > </action> > > </action-mappings> > > </struts-config> > > Please let me know what is wrong in my application. > > Thank you so much. I really appreciate your kind help in this regard. > Venkat > > >>> [EMAIL PROTECTED] 08/27/03 11:05AM >>> > hi > validator has nothing to do with Dispatch action. > paste ur code here if possible to trace ur problem > > --nagi > > -------Original Message------- > > From: Struts Users Mailing List > Date: Wednesday, August 27, 2003 08:00:18 PM > To: [EMAIL PROTECTED] > Subject: Validator and DispatchAction > > Has anybody been successful using validator framework with > DispatchAction? Please let me know. I am getting "NoSuchMethodFound" > error. Please reply. > > TIA, > Venkat > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > . > > SELi --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]