过程:
1在action定义一个拦截器,public class xxxInterceptor extends AbstractInterceptor{};
2再在struts.xml中定义一个<interceptor name=" " class=" "></interceptor>拦截器;
3最后在action中引用拦截器,<action name=" " class=" " >
<result name="input">/login.jsp</result>
<interceptor-ref name="defaultStack"></interceptor-ref>
</action>