您的位置:首页 > 编程语言 > Java开发

struts2---The content of element type "package" must match "(result-types?,interceptors?,default-int

2017-12-15 22:19 465 查看
在struts.xml中配置了拦截器之后报错了,错误为:

The content of element type "package" must match "(result-types?,interceptors?,default-interceptor-ref?,default-action-ref?,default-class-ref?,global-results?,global-exception-mappings?,action*)".,

我是因为把自定义拦截器写在了action前面导致出错,原来是package里元素必须按照一定的顺序排列:

result-types 
interceptors 
default-interceptor-ref 
default-action-ref 
default-class-ref 
global-results 
global-exception-mappings 
action*(就是所有的action放到最后)  
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐