You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by Kris O'Neil <kr...@petrosys.com.au> on 2023/01/18 03:24:17 UTC
struts2-json-plugin: ExecuteAndWait issue when returning JSON
Hi All,
While upgrading from Struts 2.5.30 to 6.1.1, I found an issue when using the ExecuteAndWaitInterceptor, if the action returns JSON data. I believe the issue was introduced in version 6.0.0 on WW-5070. The JSONResult.findRootObject(...) method was changed to call 'stack.findValue("#action")' instead of 'stack.peek()' to get the root object. This results in the polling action being returned instead of the original action that was executed, causing data to be missing from the final response.
Workaround:
Changing the action to implement 'ModelDriven' reinstates the old behaviour of calling 'stack.peek()' in the JSONResult.findRootObject(...) method.
Thanks,
Kris