public class MethodInterceptorTest implements MethodInterceptor{ //拦截器拦截业务层 public Object invoke(MethodInvocation methodInvocation) throws Throwable {   //请问我如何在这里获得HttpServletRequest 对象?  }
}注:这中方法试过了,不能获取。
HttpServletRequest request = null;
ActionMapping mapping = null;
for (int i = 0; i < arguments.length; i++) {
if (arguments[i] instanceof HttpServletRequest) {
request = (HttpServletRequest) arguments[i];
}
if (arguments[i] instanceof ActionMapping) {
mapping = (ActionMapping) arguments[i];
}
}