转载自:http://www.blogjava.net/nokiaguy/archive/2008/05/04/198071.html
Struts官网发布的Struts结构图如下:
Struts2的拦截器和Servlet过滤器类似。在执行Action的execute方法之前,Struts2会首先执行在struts.xml中引用的拦截器,在执行完所有引用的拦截器的intercept方法后,会执行Action的execute方法。
Struts2拦截器类必须从com.opensymphony.xwork2.interceptor.Interceptor接口继承,在Intercepter接口中有如下三个方法需要实现: