为什么拦截器没有生效
<!-- 注册拦截器 -->
<interceptors>
<interceptor name="auth" class="com.interceptor.AuthIntetceptor"></interceptor>
<!-- 自定义拦截器栈 -->
<interceptor-stack name="myStack">
<interceptor-ref name="defaultStack"></interceptor-ref>
<interceptor-ref name="auth"></interceptor-ref>
</interceptor-stack>
</interceptors>
<action name="auth">
<result>manager.jsp</result>
<result name="login">login.jsp</result>
<!-- 引用拦截器栈 -->
<interceptor-ref name="myStack"></interceptor-ref>
</action>
@Override
public String intercept(ActionInvocation invocation) throws Exception {
ActionContext context = ActionContext.getContext();
Map<String, Object> session =context.getSession();
if(session.get("loginInfo")!=null) {
String result=invocation.invoke();
return result;
}else {
return "login";
}
}