1.工程视图
2.MyIntercept类
package com.ask.intercept;
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.interceptor.AbstractInterceptor;
public class MyIntercept extends AbstractInterceptor{
@Override
public String intercept(ActionInvocation actioninvocation) throws Exception {
System.out.println("beging myInterceptor");
String result=actioninvocation.invoke();
System.out.println("end myInterceptor");
return result;
}
}
3.struts.xml