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放到最后)
错误提示是:
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放到最后)
相关文章推荐
- Hibernate配置文件错误提示,The content of element type "list" must match "(meta*,subselect?,cache?,synchroniz
- struts2---The content of element type "package" must match "(result-types?,interceptors?,default-int
- Hibernate配置文件报错:The content of element type "session-factory" must match "(property*,mapping*,(c
- struts2---The content of element type "package" must match "(result-types?,interceptors?,default-int
- struts2---The content of element type "package" must match "(result-types?,interceptors?,default-int
- hibernate:newclass.hbm.xml文件错误(the content of element type "class" must match "(meta*,column*,type?generator?...)
- mybatis配置文件,注意标签配置顺序。否则报错The content of element type "configuration" must match "(properties?,settin
- 错误:“The content of element type "package" must match "(result-types?,interceptors?,default-intercept
- 【原创】mybatis配置文件报错:The content of element type "configuration" must match "(properties>settings>typeAliases>typeHa...
- mybatis配置文件,注意标签配置顺序。否则报错The content of element type "configuration" must match "(properties?,settings?,...怎么解决
- struts.xml错误提示:The content of element type "package" must match "(result-types?,interceptors?,defaul
- struts2框架校验文件配置提示The content of element type "validators" must match "(validator)+".
- struts2 问题 The content of element type "package" must match "(result-types?,interceptors?,
- The content of element type "package" must match "(result-types?,interceptors?,default-interceptor-r
- The content of element type "package" mustmatch "(result-types?,interceptors?,default-interceptor-re
- 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*)".
- The content of element type "package" must match "(result-types?,interceptors?,default-intercept .
- The content of element type "package" must match...
- 报错:“The content of element type "package" must match "(result-types?,interceptors?,default-intercept
- The content of element type "struts" must match "(package|include|bean|constant)*".