Hi Steve,

I just saw your message now. You are correct. I disabled javascript
which is used to set the value of dispatch1 to something other than the
default value (errror). Your insight really helped me pinpoint the bug.
Thank you so much. I was about to drop the idea of using validators...
Thank you for all your time and effort.

Venkat

>>> [EMAIL PROTECTED] 08/27/03 01:42PM >>>
The error message you are receiving indicates that DispatchAction is
trying
to find a method named 'error' in your class and it can't find one.

There's really only two reasons that could be:
  1. There should be a method named 'error' and there isn't one.
  2. There isn't supposed to be one but somehow you are attempting
     to call it with a URL like this:
       http://localhost:8080/myapp/tr518page1.do?dispatch1=error 

Are you dynamically generating the URL? If so, that might be the
problem if
it is generating an error returning a string like "error=XXXX".

For what it's worth, I copied your code and it dispatches perfectly
well
here. (BTW my previous message about Exceptions was a red herring.
Although
you should be throwing Exception, I tried it as you had written and it
works.)

Steve
http://www.ninsky.com/struts/ 



> -----Original Message-----
> From: Venkat Jambulingam [mailto:[EMAIL PROTECTED] 
> Sent: August 27, 2003 9:58 AM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED] 
> Subject: RE: Validator and DispatchAction
>
>
> 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.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(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] 
>
> >
> >
> > .
> >
> >
>
---------------------------------------------------------------------
> > 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]

Reply via email to