struts1和spring进行整合的时候struts-config.xml文件的配置顺序问题

struts-config.xml的配置文件必须按下面的顺序进行配置:

1、display-name

2、description

3、data-sources

4、form-beans

5、global-exceptions

6、global-forwards

7、action-mappings

8、controller

9、message-resources*

10、plug-in*

如果不按此顺序会报如下异常:切记!

严重: Parse Error at line 40 column 17: The content of element type "struts-config" must match "(display-name?,description?,data-sources?,form-beans?,global-exceptions?,global-forwards?,action-mappings?,controller?,message-resources*,plug-in*)".
org.xml.sax.SAXParseException: The content of element type "struts-config" must match "(display-name?,description?,data-sources?,form-beans?,global-exceptions?,global-forwards?,action-mappings?,controller?,message-resources*,plug-in*)".
    at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)

 

posted @ 2012-04-20 18:38  GYW.  阅读(760)  评论(0编辑  收藏  举报