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

来源:互联网 发布:jsp引入js 编辑:程序博客网 时间:2024/06/09 06:48

在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放到最后)  

阅读全文
0 0
原创粉丝点击