struts2 拦截器1

action invoke前会调用,invoke后会调用

public class FirstInterceptor extends AbstractInterceptor{
    
    
    @Override
    public String intercept(ActionInvocation actionInvocation) throws Exception {
        String result = actionInvocation.invoke();
        return result;
    }
    
}
        <interceptors>
            <interceptor name="firstInter" class="com.wolfgang.interceptor.FirstInterceptor"></interceptor>
        </interceptors>
        <action name="testOGNL" class="com.wolfgang.action.TestOGNL">
            <interceptor-ref name="firstInter"></interceptor-ref>
            <result>/OGNL/static.jsp</result>
        </action>
原文地址:https://www.cnblogs.com/unixshell/p/3458549.html