struts2拦截器问题
package com.itcast.Interceptor;
import javax.script.Invocable;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.interceptor.Interceptor;
public class PermissionInterceptor implements Interceptor {
public void destroy() {
}
public void init() {
}
public String intercept(ActionInvocation arg0) throws Exception {
Object user = ActionContext.getContext().getSession().get("user");
if (user != null){
return invocation.invoke();
}
ActionContext.getContext().put("message", "权限不足");
return "success";
}
}
--------------------------------------------------------
为何invocation.invoke(); 识别不出来啊?报错,请高手指点