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

struts2配置文件错误(The content of element type “package” must match**)

2013-03-29 19:58 459 查看
今天在对struts2的做一些缺省配置,当想增加一个缺省的action时,出现了错误 

错误提示是: 

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*)”. 

个人理解,字面意思应该是可能某个节点写错了,但是仔细对照了一下没有发现配置文件中有对不上号的节点啊,于是上网搜索了一下 

原来是需要是需要按照一定的顺序排列的,按照错误提示就是: 

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