My questions:
- In Struts2, each action object has its own ActionContext and ValueStack?
In other words, a new action object is created for each new request. Does this mean that every time a new action object is created, a new ActionContext and ValueStack are also created?
- Consider this scenario:
Action1 ------ 1st req -------> view.jsp ------ 2nd req ---------> action2.
So, when the request comes for action1, a new action1 object is created and the corresponding ActionContext and ValueStack.
From view.jsp (when clicking the hyperlink) a new request appears for action2.
Does this mean that previous ActionContext and ValueStack (associated with action1) are destroyed and new ActionContext and ValueStack (for action2) are created?
- Suppose I store something in ActionContext (of action1) in view.jsp and then click on the hyperlink for action2 (from view.jsp), will this data be lost along with ActionContext (of1)?
source
share