Validator and DispatchAction

2003-08-27 Thread Venkat Jambulingam
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]



newbie question

2003-08-27 Thread Venkat Jambulingam
I have two jsp pages. sicpage0.jsp and sicpage1.jsp

sicpage0 is a static page. when I submit sicpage0, it calls an action
class which populates sicpage1.jsp with data.

Now I want to call sicpage1.jsp directly without first calling
sicpage0.jsp.

But sicpage1.jsp is not getting populated with data since the action
class is not getting called.

Can someone help me please?

TIA,
Venkat

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Validator and DispatchAction

2003-08-27 Thread Venkat Jambulingam
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:
errorjava.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(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)
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(ServletManager.java:827)
at
com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecycleServlet.java:167)
at
com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServlet.java:297)
at
com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycleServlet.java:110)
at
com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:472)
at
com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletManager.java:1012)
at
com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletManager.java:913)
at
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:678)
at
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:331)
at
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:117)
at
com.ibm.servlet.engine.srt.WebAppInvoker.doForward(WebAppInvoker.java:134)
at
com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:239)
at
com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:67)
at
com.ibm.servlet.engine.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java:106)
at
com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:154)
at
com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(OSEListener.java:315)
at
com.ibm.servlet.engine.http11.HttpConnection.handleRequest(HttpConnection.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(WebAppDispatcherResponse.java:93)
at
org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:272)
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)
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(ServletManager.java:827)
at
com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecycleServlet.java:167)
at
com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServlet.java:297)
at
com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycleServlet.java:110)
at
com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:472)
at
com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletManager.java:1012)
at
com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletManager.java:913)
at
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:678)
at
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:331)
at

Re: Validator and DispatchAction

2003-08-27 Thread Venkat Jambulingam
Hi Nagi,

Below is the action class code:

public class Tr518page1Action extends DispatchAction {

//String businessNum = null;

/**
* Constructor
*/
public Tr518page1Action() {

super();

}


public ActionForward create(
ActionMapping mapping, 
ActionForm form, 
HttpServletRequest request, 
HttpServletResponse response) 
  throws IOException, ServletException { 

String statusCode = null;
String businessNum = zero;

HttpSession session = request.getSession();
session.setAttribute(businessNumber,
businessNum);   


ActionErrors errors = new ActionErrors();
ActionForward forward = new ActionForward();
// return value
Tr518Form tr518Form = (Tr518Form) form;


//String dispatch = tr518Form.getDispatch();

try {

if
(session.getAttribute(businessNumber).equals(zero)) {

Insert518page1 insertpg1 = new
Insert518page1();
businessNum =
insertpg1.ins518pg1(tr518Form);

System.out.println(businessNumber  : 
+  businessNum);

session.setAttribute(businessNumber,
businessNum);   

} else  {

Update518page1 updatepg1 = new
Update518page1();
statusCode =
updatepg1.upd518pg1(tr518Form,session);

}   

} catch (Exception e) {

// Report the error using the appropriate name
and ID.
errors.add(name, new ActionError(id));

}

// If a message is required, save the specified key(s)
// into the request for use by the struts:errors tag.

if (!errors.isEmpty()) {
saveErrors(request, errors);
}
// Write logic determining how the user should be
forwarded.
forward = mapping.findForward(next);

// Finish with
return (forward);
}

public ActionForward save(
ActionMapping mapping, 
ActionForm form, 
HttpServletRequest request, 
HttpServletResponse response) 
  throws IOException, ServletException { 

String businessNum = null;

ActionErrors errors = new ActionErrors();
ActionForward forward = new ActionForward();
// return value
Tr518Form tr518Form = (Tr518Form) form;
//String dispatch = tr518Form.getDispatch();
try {
Insert518page1 insertpg1 = new
Insert518page1();
businessNum = insertpg1.ins518pg1(tr518Form);

System.out.println(businessNumber  :  + 
businessNum);

HttpSession session = request.getSession();
session.setAttribute(businessNumber,
businessNum);   
} catch (Exception e) {
// Report the error using the appropriate name
and ID.
errors.add(name, new ActionError(id));
}
// If a message is required, save the specified key(s)
// into the request for use by the struts:errors tag.
if (!errors.isEmpty()) {
saveErrors(request, errors);
}
// Write logic determining how the user should be
forwarded.
forward = mapping.findForward(exit);

// Finish with
return (forward);
}

}


Please let me know where I am wrong.

Thanks again so much,
Venkat

 Nagendra Kumar O V S [EMAIL PROTECTED] 08/27/03 11:58AM 
hi,
could u post ur action class code . looks like u dont have a method
with the
name error defined in the dispatchaction class.
have u defined the parameter for this action mapping??


-- nagi

---Original Message---

From: Venkat Jambulingam
Date: Wednesday, August 27, 2003 09:13:27 PM
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

Re: Validator and DispatchAction

2003-08-27 Thread Venkat Jambulingam
oops.. I did not understand your question about defining parameter for
the action mapping.

In my struts-config.xml, I have defined the parameters for the actions
as given below:

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

Please let me know if this is the parameter you are talking about.

Thanks in Advance,
Venkat



 Nagendra Kumar O V S [EMAIL PROTECTED] 08/27/03 11:58AM 
hi,
could u post ur action class code . looks like u dont have a method
with the
name error defined in the dispatchaction class.
have u defined the parameter for this action mapping??


-- nagi

---Original Message---

From: Venkat Jambulingam
Date: Wednesday, August 27, 2003 09:13:27 PM
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:
errorjava.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(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)
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(ServletManager
java:827)
at
com.ibm.servlet.engine.webapp.StrictLifecycleServlet
_service(StrictLifecycleServlet.java:167)
at
com.ibm.servlet.engine.webapp.IdleServletState
service(StrictLifecycleServlet.java:297)
at
com.ibm.servlet.engine.webapp.StrictLifecycleServlet
service(StrictLifecycleServlet.java:110)
at
com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager
java:472)
at
com.ibm.servlet.engine.webapp.ValidServletReferenceState
dispatch(ServletManager.java:1012)
at
com.ibm.servlet.engine.webapp.ServletInstanceReference
dispatch(ServletManager.java:913)
at
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher
handleWebAppDispatch(WebAppRequestDispatcher.java:678)
at
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher
dispatch(WebAppRequestDispatcher.java:331)
at
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher
forward(WebAppRequestDispatcher.java:117)
at
com.ibm.servlet.engine.srt.WebAppInvoker.doForward(WebAppInvoker.java:134)
at
com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker
java:239)
at
com.ibm.servlet.engine.invocation.CachedInvocation
handleInvocation(CachedInvocation.java:67)
at
com.ibm.servlet.engine.invocation.CacheableInvocationContext
invoke(CacheableInvocationContext.java:106)
at
com.ibm.servlet.engine.srp.ServletRequestProcessor
dispatchByURI(ServletRequestProcessor.java:154)
at
com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(OSEListener
java:315)
at
com.ibm.servlet.engine.http11.HttpConnection.handleRequest(HttpConnection
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(WebAppDispatcherResponse.java:93

RE: Validator and DispatchAction

2003-08-27 Thread Venkat Jambulingam
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:
 errorjava.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

RE: Validator and DispatchAction

2003-08-27 Thread Venkat Jambulingam
It works now... Thank you for all the help. 

 [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:
 errorjava.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

RE: Validator and DispatchAction

2003-08-27 Thread Venkat Jambulingam
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:
 errorjava.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

RE: Validator and DispatchAction

2003-08-27 Thread Venkat Jambulingam
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=.

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:
  errorjava.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

RE: Validator and DispatchAction

2003-08-27 Thread Venkat Jambulingam
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:
 errorjava.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

Validator framework and DispatchAction

2003-08-26 Thread Venkat Jambulingam
Hi there,

I extended my Action classes with DispatchAction class and it works
just fine. Now I am trying to use validator framework in my app.
JavaScript validation is working fine. But server-side validation is
giving NoSuchMethodFound error. I searched the archive but could not
find any solution. I saw some discussions on 
ValidatorLookupDispatchAction class. I am not sure whether it is ready
for production use. Can anyone please suggest some solution? 

Thanks,
Venkat

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



where can I get struts-validator.tld ?

2003-08-18 Thread Venkat Jambulingam
Hi there,

I am using Struts 1.1 and would like some guidance on using validator
framwork. From where can I get struts-validator.tld ?

Thanks,
Venkat

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: where can I get struts-validator.tld ?

2003-08-18 Thread Venkat Jambulingam
I'm little bit confused about using validator framework.

In struts 1.1 beta 3 release, do I need to keep struts-validator.tld
file under WEB-INF folder ?

Thanks for your help.

 [EMAIL PROTECTED] 08/18/03 04:34PM 





!DOCTYPE form-validation PUBLIC -//Apache Software Foundation//DTD
Commons Validator Rules Configuration 1.0//EN
http://jakarta.apache.org/commons/dtds/validator_1_1.dtd;


-
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]