Can any one please describe me when the objects of ActionMapper
, ActionProxy
, ActionInvocation
, ActionContext
are created in a Struts2 application. As I am new to Struts2 framework, I am very much confused about the scopes of these objects.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
The ActionMapper
is created on startup, it has a singleton scope.
The ActionContext
is created by the Dispatcher
in preparing an action to execute, it's ThreadLocal, and it doesn't have any scope.
When action is executing the ActionInvocation
and ActionProxy
are created that also don't have a scope.
You can see this on a big picture of Struts2 architecture.