I created the following action
@Action(value = "searchPersonByName", results = {@Result(type = "json",
params = {"status", "204" }) })
public List<Person> searchPerson() {
return new ArrayList<Person>();
}
Deploying struts application with this action throws the following error
Caused by: The Result type [json] which is defined in the Result annotation on the class [class com.mk.gk.actions.PersonAction] or determined by the file extension or is the default result type for the PackageConfig of the action, could not be found as a result-type defined for the Struts/XWork package [com.mk.gk.actions#/#/] - [unknown location]
I want to call this action in jquery.ajax with dataType as "json". How to achieve this? How to get this action type as json.