How to call action of struts2 from open method of ajax xmlhttp.open("GET", "action_name", true);
I want to get some data from action of struts2 and assign it to the object created in jsp fil开发者_运维百科e by using ajax
Give it the URL to your Struts2 action. If you need to return JSON from your action, there is a plugin for that which comes bundled with Struts2.
Calling a struts action is very easy just mention the action name as the url.In order to get some data from action and use it in your jsp take a look at this link
精彩评论