Meaningless Drivel is fun!*
The moose likes Struts and the fly likes does a new action context created for every new action in struts2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "does a new action context created for every new action in struts2" Watch "does a new action context created for every new action in struts2" New topic
Author

does a new action context created for every new action in struts2

sandy sean
Ranch Hand

Joined: Dec 30, 2010
Posts: 69


my queries are:-

1)in struts2, does every action object has its own corresponding ActionContext and Value stack (VS)?

I mean ... for every new request a new action object is created.Does this mean every time a new action object is created, a new actioncontext and valuestack also get created?

2)consider this scenario:-

Action1------1st req------->view.jsp------2nd req--------->action2

so when request comes for action1 a new object of action1 and corresponding Actioncontext and Valuestack will get created.

From view.jsp (upon clicking hyperlink) an new request goes for action2.

Does this mean that previous ActionContext and VS(related to action1) gets destroyed and a new ActionContext and VS( for action2) get created?

3)Suppose i store something in ActionContext(of action1) in view.jsp and then click on hyperlink for action2 (from view.jsp), will that data along with the ActionContext(of action1) gets lost.

Thanks...
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: does a new action context created for every new action in struts2