interceptor发生在action调用之前,拦截器的参数就是ActionInvocation(action实例),ActionInvocation里封装了HttpServletRequest
public class AuthInterceptor extends MethodFilterInterceptor {
public String intercept(ActionInvocation invocation) throws Exception {
ActionContext actionContext = invocation.getInvocationContext();
HttpServletRequest request=
(HttpServletRequest) actionContext.get(StrutsStatics .HTTP_REQUEST);
}
}