1.ActionMapper
http请求,进入ActionContextCleanup(session,Attribute保留),走一些过滤器,filter,然后进入struts2 FilterDispatcher
然后进入ActionMapper,这个是用来判断请求是否 需要struts2处理

2.ActionProxy
actionproxy就是action的代理,获取action对象传给ActionInvocation执行

3.ActionInvocation
ActionInvocation就是得到actionproxy的action后执行action

4.Interceptor
SpringMVC 中的Interceptor 拦截器主要作用是拦截用户的请求并进行相应的处理。比如通过它来进行权限验证,或者是来判断用户是否登陆等。

 

Struts2工作原理

posted on 2017-03-14 18:58  老-.-猫  阅读(426)  评论(0)    收藏  举报