首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 其他教程 > 其他相关 >

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

2012-09-08 
struts2配置文件错误(The content of element type “package” must match**)今天在对struts2的做一些缺省

struts2配置文件错误(The content of element type “package” must match**)
今天在对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放到最后)

原来我把default-action-ref放在了其他的节点之后了,调整位置之后,错误消失了

热点排行