This is my struts 2 flow where i am using action chaining
JSP--->Action1--->Action2--->ResultJsp
With action chaining , my understanding is that request is forwarded from action1 to action2.So if i pass some parameter from action1 to action 2 it should be set in new action instance variable(/value stack created for new action).But its not happening
Below is my code in action1
@Result(name = "displayEmployee",type = "chain",
params = {
"namespace", "/employee",
"actionName", "Employee-lookup!search",
"empMode", "true"
})
@Action("display-employee!displayEmployee")
public String displayEmployee() {
return "displayEmployee";
}
Now in Action 2 i.e display-employee , i have boolean property with name empMode. But i get the value as false though i should get it true because i am passing it as attribute in result annotation. As my understanding in action chaining, all request paramaters are forwarded from action1 to action2. Basically new value stack is created for action2 which contains the variables which were present in action1. So why value true is not set for empMode property in action 2?