struts2 if result type json and method defined then all methods get invoked
posted 5 years ago
I have an Action class with 4 action methods. All four action action methods use a json result.
Via logging statements and debugging, I have verified that if I call action method 1, action method 2 and 3 are also called. But not 4. Finally, action method 1 is called again and the json result is generated
If I change the result type of Action method 1 to the default dispatcher with a jsp location, only action method 1 is called. (this is the behavior I want with the json result) Hope that makes sense.