posted 10 years ago
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.