当前位置: 代码迷 >> Java Web开发 >> 定义了一个拦截器 登记的时候老提示这个
  详细解决方案

定义了一个拦截器 登记的时候老提示这个

热度:1117   发布时间:2013-02-25 21:17:44.0
定义了一个拦截器 注册的时候老提示这个:
我是这么写的:
XML code
    <package name="myPage" namespace="/test" extends="struts-default">                <interceptors>            <interceptor name="permission" class="cn.xn.interceptor.PermissionInterceptor"/>            <interceptor-stack name="permissionStack" > [color=#FF0000]//在此处提示错误:The content of element type "interceptor-stack" must match "(interceptor-ref)*".[/color]                <intercoptor-ref name="defaultStack"/>                <interceptor-ref name="permission" />            </interceptor-stack>        </interceptors>..................                <!-- 自定义拦截器 -->        <action name="myfilter_*" class="com.xn.MyFilterAction" method="{1}">            <result>/WEB-INF/page/filterMessage.jsp</result>            <interceptor-ref name="permissionStack"/>        </action>            </package>


The content of element type "interceptor-stack" must match "(interceptor-ref)*"
是什么意思?


------解决方案--------------------------------------------------------
你拼写错误了,应该是interceptor-ref,而不是intercoptor-ref


那个提示非常清楚了吧。节点interceptor-stack的内容必须符合 “零至多个interceptor-ref节点”
  相关解决方案