arse Error at line 58 column 17: The content of element type "struts-config" must match "(display-na
2017-10-13 15:56
831 查看
以前没有接触过struts1的项目 刚上来开发公司来的项目的时候遇到的这个错误。
报错信息:
严重: Parse Error at line 58 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*)".
问题分析:
解决办法:
The content of element type "struts-config" must match "(data-sources?,form-bean
最近新建一个项目,发现tomcat启动的时候时,控制台一直报告异常信息:
10 12 22 09:49:016,306 ERROR Digester:1463 - Parse Error at line 21 column 17: The content of element type "struts-config" must match "(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 "(data-sources?,form-beans?,global-exceptions?,global-forwards?,action-mappings?,controller?,message-resources*,plug-in*)".
struts-config.xml配置文件顺序 The content of element type "struts-config" must match
struts-config.xml中的元素有严格的顺序,如果元素的顺序出错,系统会抛出一个错误,描述如下:
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*)". [109]
刚看到这个错误,我总以为是某个元素的拼写出了错误,把整个文件仔细检查了一遍,没有发现任何拼写作错误。查了资料才知道,struts-config.xml中的元素有严格的顺序,他们的顺序应该是象下面这个样子:
<struts?config>
<data?sources>
<data?source>
</data?source>
</data?sources>
<form?beans>
<form?bean />
</form?beans>
<global?forwards>
<forward />
</global?forwards>
<action?mappings>
<action/>
</action?mappings>
<controller />
<message?resource />
<plug?in />
</struts?config>
上面的错误提示不是说元素有拼写错误,而是说struts-config.xml必须按照display-name-->description-->datasources-->form-beans-->global-forwards-->action-mappings-->controller-->message_resources-->plug-in的顺序书写。
注意: 节点之间要有换行
报错信息:
严重: Parse Error at line 58 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*)".
问题分析:
解决办法:
The content of element type "struts-config" must match "(data-sources?,form-bean
最近新建一个项目,发现tomcat启动的时候时,控制台一直报告异常信息:
10 12 22 09:49:016,306 ERROR Digester:1463 - Parse Error at line 21 column 17: The content of element type "struts-config" must match "(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 "(data-sources?,form-beans?,global-exceptions?,global-forwards?,action-mappings?,controller?,message-resources*,plug-in*)".
struts-config.xml配置文件顺序 The content of element type "struts-config" must match
struts-config.xml中的元素有严格的顺序,如果元素的顺序出错,系统会抛出一个错误,描述如下:
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*)". [109]
刚看到这个错误,我总以为是某个元素的拼写出了错误,把整个文件仔细检查了一遍,没有发现任何拼写作错误。查了资料才知道,struts-config.xml中的元素有严格的顺序,他们的顺序应该是象下面这个样子:
<struts?config>
<data?sources>
<data?source>
</data?source>
</data?sources>
<form?beans>
<form?bean />
</form?beans>
<global?forwards>
<forward />
</global?forwards>
<action?mappings>
<action/>
</action?mappings>
<controller />
<message?resource />
<plug?in />
</struts?config>
上面的错误提示不是说元素有拼写错误,而是说struts-config.xml必须按照display-name-->description-->datasources-->form-beans-->global-forwards-->action-mappings-->controller-->message_resources-->plug-in的顺序书写。
注意: 节点之间要有换行
相关文章推荐
- The content of element type "struts-config" must match "(display-name?,descripti .
- The content of element type "struts-config" must match "(display-name?,description?,data-sources?,fo
- The content of element type "struts-config" must match "(display-name?,descr
- The content of element type "struts-config" must match "(data-sources?,form-
- 完全解决struts启动时报错:The content of element type "struts-config" must match "(data-sources?,form-beans?,global-exceptions?,global-for
- The content of element type "web-app" must match "(icon?,display-name?,description?,distributable?,c
- xml之解决The content of element type "web-app" must match "(icon?,display......方案
- web.xml配置bug之提示The content of element type "web-app" must match "(icon?,display- name?,description?,distributable?,
- web.xml配置bug之提示The content of element type "web-app" must match "(icon?,display- name?,description?,
- 解决The content of element type "web-app" must match "(icon?,display
- The content of element type "struts" must match "(package|include|bean|constant)*".
- The content of element type "sqlMapConfig" is incomplete, it must match "(properties?,settings?,resu
- 解决web.xml配置bug之提示The content of element type "web-app" must match "(icon?,display- name?
- hibernate.cfg.xml出错:The content of element type "property" must match "(meta*,(column|formula)*
- Java大牛养成记(5)——The content of element type "struts" must match "(package|include|bean|constant)*".
- hibernate.cfg.xml出错:The content of element type "property" must match "(meta*,(column|formula)*
- The content of element type "web-app" must match "(icon?,display-name?,description?,distributable?,c
- The content of element type "struts" must match "((package|include|bean|constant)*,unknown-handler-s
- The content of element type "web-app" must match "(icon?,display-name?,description?,distributable?,c
- The content of element type "web-app" must match "(icon?,display- name?,description?...)