• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

java.lang.NoSuchMethodException: .(org.apache.struts.action.ActionMapping, org.apache.struts.action.

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am using Struts 1.3.10 and making Ajax calls to Struts Dispatch Action. But I am getting the exception. the code and exception details are as follows:

JSP:



Java dispatch action class:
------------------------------------


Struts Config:
----------------



action-servlet.xml
----------------------



Error Message:
-------------------



This is happening when we click on "accept" buttons of page. Quick help is appreciable.

Thanks
 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


I'm suspicious about this bit. I don't see a "method" setting in the jQuery.ajax() documentation and if there were, I would think it would refer to the HTTP method (i.e. PUT, GET, etc.) rather than a Java class method. jQuery knows nothing of Java or Struts.
 
Chandrasekhar Aadhanapattu
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It was solved and I am answering myself.

If we use Struts and have ajax calls, then it depends on whether we want to have ajax call by submitting form or without submitting form. If we want to submit the form, then option 1. If we do not want to submit the form and want to have ajax calls then option 2.

1. Embedding all html content inside <html:form></html:form> tag and call concerned action in ajax calls as follows:



2. If we don't want to submit the whole form by calling the concerned actions, then do not put the html content in between <html:form></html:form> tags and have Ajax calls as follows:



I hope it may help. Please let me know if you have any queries.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic