I have a struts2 chain result that redirects to itself but it does NOT create an infinite loop because there is a condition that will eventually evaluate to false and then the recursion will stop. I have to use chain instead of redirectAction because I need a POST request which redirectAction cannot do.
This is the exception I'm getting
Could not execute action
Infinite recursion detected: [/view/myAction!myMethod, /view/myAction, /view/myAction] - [unknown location]
I found a way to manipulate the chain history from an interceptor
final ActionContext context = invocation.getInvocationContext(); LinkedList<String> chainHistory = (LinkedList<String>) context.get("CHAIN_HISTORY"); // context.put("CHAIN_HISTORY", null);