• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

struts2 if result type json and method defined then all methods get invoked

 
Sumit King
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

Anyone have any ideas?
This question was also asked here, not by me.
http://stackoverflow.com/questions/3767698/struts2-if-result-type-json-and-method-defined-then-all-methods-get-invoked

This is my question on SO.
http://stackoverflow.com/questions/6061709/struts2-action-being-called-twice-if-result-type-is-json

But there was no answer.
Please let me know if you need more information.
 
Sumit King
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If anyone is wondering, this was answered on SO.

http://stackoverflow.com/questions/6061709/struts2-action-being-called-twice-if-result-type-is-json
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic