问题描述
报错:Thecontentofelementtype"interceptors"mustmatch"(interceptor|interceptor-stack)+"<packagename="struts"extends="struts-default"namespace="/qg"><interceptors><intercetorname="authority"class="com.qiangge.struts2.AuthorityInterceptor"></intercetor></interceptors><global-results><resultname="login">/AuthorityLogin/login.jsp</result></global-results><actionname="authortiy"class="com.qiangge.struts2.AuthorityLoginAction"><resultname="success">/AuthorityLogin/welcome.jsp</result><resultname="error">/AuthorityLogin/error.jsp</result></action><actionname="viewBook"><result>/AuthorityLogin/viewBook.jsp</result><interceptor-refname="authority"></interceptor-ref><interceptor-refname="defaultStack"></interceptor-ref></action></package>
解决方案
解决方案二:
interceptor-ref应该是interceptor-stack的子标签把
解决方案三:
xml标签写错了。顺序看看对比。
解决方案四:
<intercetorname="authority"class="com.qiangge.struts2.AuthorityInterceptor"></intercetor>单词写错了,应该是interceptor